summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/explicit34.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit34.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C
new file mode 100644
index 000000000..ea32cf6ea
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C
@@ -0,0 +1,11 @@
+// { dg-do assemble }
+// { dg-options "-fshow-column" }
+// GROUPS passed templates
+template <class T>
+void foo(T t);
+
+template <>
+void foo(int) {}; // { dg-error "6:previously declared here" }
+
+template <>
+void foo<int>(int) {} // { dg-error "6:redefinition" }