From 4a30151d102fe111f5de787992494970248ae246 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 3 Aug 1999 14:46:14 +0000 Subject: [PATCH] * g++.old-deja/g++.other/struct1.C: New test. From-SVN: r28474 --- gcc/testsuite/ChangeLog | 4 ++ .../g++.old-deja/g++.other/struct1.C | 42 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.other/struct1.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 885df45b7609..429cb89ae567 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +1999-08-03 Nathan Sidwell + + * g++.old-deja/g++.other/struct1.C: New test. + 1999-08-03 Nathan Sidwell * 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 index 000000000000..4f1c52ab0923 --- /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 + +// 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 X +{ // ERROR - previous definition +}; +template class X +{ // ERROR - redefinition +}; + +template class X +{ // ERROR - previous definition +}; +template class X +{ // ERROR - redefinition +}; + +template<> class X +{ // ERROR - previous definition +}; +template<> class X +{ // ERROR - redefinition +}; + +template<> class X +{ // ERROR - previous definition +}; +template<> class X +{ // ERROR - redefinition +};