1 // PR c++/92062 - ODR-use ignored for static member of class template.
2 // { dg-do run { target c++11 } }
3 
4 template<int> struct A {
5   static const bool x;
6   static_assert(&x, ""); // odr-uses A<...>::x
7 };
8 
9 int g;
10 
11 template<int I>
12 const bool A<I>::x = (g = 42, false);
13 
f(A<0>)14 void f(A<0>) {}        // A<0> must be complete, so is instantiated
main()15 int main()
16 {
17   if (g != 42)
18     __builtin_abort ();
19 }
20