Skip to content

Commit

Permalink
fix Issue 22399 - importC: Error: static variable cannot be read at c…
Browse files Browse the repository at this point in the history
…ompile time
  • Loading branch information
ibuclaw committed Oct 17, 2021
1 parent fec7ccd commit 50da4f9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/compilable/testcstuff2.c
Expand Up @@ -458,6 +458,22 @@ static const S22375 s22375[10] =
{32, 258, 258, 4096}
};

/***************************************************/
// https://issues.dlang.org/show_bug.cgi?id=22399

struct S22399a
{
unsigned short f1;
};

struct S22399b
{
const struct S22399a *f1;
};

const struct S22399a C22399[1] = { {12} };
const struct S22399b C22399b = {C22399};

/***************************************************/
// https://issues.dlang.org/show_bug.cgi?id=22400

Expand Down

0 comments on commit 50da4f9

Please sign in to comment.