1// PR c++/52688 2// { dg-do link } 3 4template<class T> 5struct A { 6 static bool test() { 7 static bool value = false; 8 if (value) 9 return false; 10 struct S { 11 S() { value = true; } 12 }; 13 static S s; 14 return true; 15 } 16}; 17 18int main() 19{ 20 A<int>::test(); 21} 22