aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/const2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/const2.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/const2.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/const2.C b/gcc/testsuite/g++.old-deja/g++.pt/const2.C
new file mode 100644
index 00000000000..3c064fe6d4a
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/const2.C
@@ -0,0 +1,9 @@
+// This test should get a linker error for the reference to A<int>::i.
+// An XPASS on this test is really a FAIL.
+// excess errors test - XFAIL *-*-*
+
+template <class T> struct B { static const int i = 3; };
+template <class T> struct A { static const int i = B<T>::i; };
+const int *p = &A<int>::i;
+
+int main(){}