summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-03 14:46:14 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-03 14:46:14 +0000
commit26593fd11f0a07242b9dd525e844f0d8ecb3dacf (patch)
tree54faa9c6d24542ad78e34d3eaf1055bee3f5e549 /gcc
parent8c64e68afac435cd6ac07ac8eeff6cd8198d8238 (diff)
downloadgcc-26593fd11f0a07242b9dd525e844f0d8ecb3dacf.tar.gz
* g++.old-deja/g++.other/struct1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28474 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/struct1.C42
2 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 885df45b760..429cb89ae56 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@
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.
Mon Aug 2 13:35:12 1999 Richard Henderson <rth@cygnus.com>
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
index 00000000000..4f1c52ab092
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/struct1.C
@@ -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
+};