aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>1999-08-03 14:46:14 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>1999-08-03 14:46:14 +0000
commit4a30151d102fe111f5de787992494970248ae246 (patch)
tree54faa9c6d24542ad78e34d3eaf1055bee3f5e549
parent13bd123dfbe7b4df76cd1e20a88d592c639eabe4 (diff)
downloadgcc-4a30151d102fe111f5de787992494970248ae246.zip
gcc-4a30151d102fe111f5de787992494970248ae246.tar.gz
gcc-4a30151d102fe111f5de787992494970248ae246.tar.bz2
* g++.old-deja/g++.other/struct1.C: New test.
From-SVN: r28474
-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 885df45..429cb89 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 0000000..4f1c52a
--- /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
+};