Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/constexpr-70001-2.C

raw
1 // PR c++/70001
2 // { dg-do run { target c++11 } }
3
4 struct B
5 {
6 struct B *a;
7 constexpr B () : a (this) { }
8 };
9
10 constexpr int N = 1 << 4;
11 struct A { B c[N]; } d;
12
13 int
14 main ()
15 {
16 for (int i = 0; i < N; ++i)
17 if (d.c[i].a != &d.c[i])
18 __builtin_abort ();
19 }