From 7737700eed582327ccf3f7ee17b30a46464c63be Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 30 Jun 1998 08:20:13 +0000 Subject: [PATCH] New tests from Klaus-Georg. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20818 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/g++.old-deja/g++.robertl/eb132.C | 27 ++++++++++++++++++++++++++ gcc/testsuite/g++.old-deja/g++.robertl/eb133.C | 16 +++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.robertl/eb132.C create mode 100644 gcc/testsuite/g++.old-deja/g++.robertl/eb133.C diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C new file mode 100644 index 00000000000..5c84b76e3d1 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C @@ -0,0 +1,27 @@ +// Build don't link +// From: Klaus-Georg Adams +// Reported against EGCS snaps 98/06/28. +// Special g++ Options: -O -Wall -fgcse -frerun-loop-opt +// +// Compilation of this program with the flags g++ -Wall -O -fgcse -frerun-loop-opt +// or -O2 produces spurious warnings in the standard header . +// +// They vanish if the declaration of a::b is taken out. + +#include + +string foo(); +struct a { + void bar(); + enum b { c, d }; + b theb; + string baz; +}; + +void +a::bar() +{ + baz += foo() + foo(); + baz += foo() + foo() + "foo"; +} + diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb133.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb133.C new file mode 100644 index 00000000000..f212252505d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb133.C @@ -0,0 +1,16 @@ +// Build don't link +// Gives ICE 109 +// From: Klaus-Georg Adams +// Reported against EGCS snaps 98/06/28. + +int main() +{ + try { + } + catch (bad_alloc) { // ERROR - parse error + return 1; + } + return 0; +} + + -- 2.11.0