Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/template11.C

raw
1 // { dg-do run }
2 // Bug: initializers for static data members of templates don't get run.
3
4 template <class T> struct A {
5 static T t;
6 };
7
8 int foo () { return 1; }
9
10 template <>
11 int A<int>::t = foo ();
12
13 int main ()
14 {
15 return (A<int>::t != 1);
16 }