]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* g++.old-deja/g++.other/struct1.C: New test.
authorNathan Sidwell <nathan@acm.org>
Tue, 3 Aug 1999 14:46:14 +0000 (14:46 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 3 Aug 1999 14:46:14 +0000 (14:46 +0000)
From-SVN: r28474

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/struct1.C [new file with mode: 0644]

index 885df45b7609b407785fdf7e316ddea22d84ad8a..429cb89ae567585560679af06e0b6dec84363d07 100644 (file)
@@ -1,3 +1,7 @@
+1999-08-03  Nathan Sidwell  <nathan@acm.org>
+
+       * g++.old-deja/g++.other/struct1.C: New test.
+
 1999-08-03  Nathan Sidwell  <nathan@acm.org>
 
        * g++.old-deja/g++.other/enum2.C: New test.
diff --git a/gcc/testsuite/g++.old-deja/g++.other/struct1.C b/gcc/testsuite/g++.old-deja/g++.other/struct1.C
new file mode 100644 (file)
index 0000000..4f1c52a
--- /dev/null
@@ -0,0 +1,42 @@
+// Build don't link:
+
+// Copyright (C) 1999 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 3 Jun 1999 <nathan@acm.org>
+
+// Duplicate definitions are wrong, we should just cough
+// politely, but we used to die horribly.
+
+class Y
+{   // ERROR - previous definition
+};
+class Y
+{   // ERROR - redefinition
+};
+
+template<class T> class X
+{   // ERROR - previous definition
+};
+template<class T> class X
+{   // ERROR - redefinition
+};
+
+template<class T> class X<T *>
+{   // ERROR - previous definition
+};
+template<class T> class X<T *>
+{   // ERROR - redefinition
+};
+
+template<> class X<int>
+{   // ERROR - previous definition
+};
+template<> class X<int>
+{   // ERROR - redefinition
+};
+
+template<> class X<int *>
+{   // ERROR - previous definition
+};
+template<> class X<int *>
+{   // ERROR - redefinition
+};