aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/template11.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/template11.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/template11.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template11.C b/gcc/testsuite/g++.old-deja/g++.jason/template11.C
new file mode 100644
index 00000000000..25449e2e742
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/template11.C
@@ -0,0 +1,14 @@
+// Bug: initializers for static data members of templates don't get run.
+
+template <class T> struct A {
+ static T t;
+};
+
+int foo () { return 1; }
+
+int A<int>::t = foo ();
+
+main ()
+{
+ return (A<int>::t != 1);
+}