summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/typename12.C31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typename12.C b/gcc/testsuite/g++.old-deja/g++.pt/typename12.C
new file mode 100644
index 00000000000..cef670089c1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/typename12.C
@@ -0,0 +1,31 @@
+// Special g++ Options:
+// execution test - XFAIL *-*-*
+// excess errors test - XFAIL *-*-*
+
+int i = 0;
+
+template <class T>
+struct S {
+ struct X {};
+};
+
+template <class T>
+void f(T)
+{
+ S<T>::X();
+}
+
+template <>
+struct S<int> {
+ static void X() { i = 1; }
+};
+
+int main()
+{
+ f(3);
+ if (i != 1)
+ return 1;
+ else
+ return 0;
+}
+