blob: 6078f0807e3c92b52d975ec53c9b4cc5766721d8 [file] [log] [blame]
/* Test C2x constexpr. Valid code using GNU extensions, compilation tests. */
/* { dg-do compile } */
/* { dg-options "-std=gnu2x" } */
struct s { struct { int x, y; } x; };
constexpr struct s v = { { 123, 150 } };
int k;
constexpr int a[200] = { [v.x.x ... v.x.y] = 7 };
void
f ()
{
switch (k)
{
case v.x.x ... v.x.y: ;
}
}