Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/static34.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/52688 |
2 // { dg-do link } | |
3 | |
4 template<class T> | |
5 struct 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 | |
18 int main() | |
19 { | |
20 A<int>::test(); | |
21 } |