PR c++/82115 - ICE with variable initialized with its own address.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-self1.C
blob32a10af49a6ea8e494e8adf0cd857b8eb4386ffa
1 // PR c++/82115
2 // { dg-do compile { target c++11 } }
4 struct A { int const u = 0; };
6 struct B : A
7
8   constexpr B (int const *p) : v (p) {}
9   int const *v;
12 constexpr B b (&b.u);
14 template < typename > void foo () { b; }
16 template < typename T> void foo2 () {
17   constexpr B b2 = &b2.u;
18   b2;