blob: f3cb7369d4a325dfe4ce8c2f2e2720e1a2b64041 [file] [log] [blame]
/* { dg-do run } */
/* { dg-options "-O2 -std=gnu23" } */
// struct with variable size
int
foo ()
{
int n = 10;
struct s { char buf[n]; } s;
{
int m = 10;
struct s { char buf[m]; } t;
typeof(*(1 ? &s : &t)) u;
return sizeof(u.buf);
}
}
int main()
{
if (10 != foo())
__builtin_abort();
return 0;
}