summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/static10.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/static10.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/static10.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/static10.C b/gcc/testsuite/g++.old-deja/g++.pt/static10.C
new file mode 100644
index 000000000..591312190
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/static10.C
@@ -0,0 +1,17 @@
+// { dg-do assemble }
+// regression test -
+
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+
+template<class A>
+struct X {
+ X(A) {
+ }
+};
+template<class A>
+struct Y {
+ static X<A> x(A(1)); // { dg-error "" } ANSI C++ forbids in-class initialization of non-const static member `x'
+};
+Y<int> y;
+