1 // PR c++/82115
2 // { dg-do compile { target c++11 } }
3 
4 struct A { int const u = 0; };
5 
6 struct B : A
7 {
BB8   constexpr B (int const *p) : v (p) {}
9   int const *v;
10 };
11 
12 constexpr B b (&b.u);
13 
foo()14 template < typename > void foo () { b; }
15 
foo2()16 template < typename T> void foo2 () {
17   constexpr B b2 = &b2.u;
18   b2;
19 }
20