aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKlaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>1998-06-30 08:20:13 +0000
committerRobert Lipe <robertl@gcc.gnu.org>1998-06-30 08:20:13 +0000
commit2d4b533de43c04ee313d654c64c52cbe4d948d71 (patch)
treee39f8ef2ccf6f56a18a7c607d777ee3e26f3b41b /gcc
parenta6fa6420035fd39fb872da5dfd17f63e98739d75 (diff)
downloadgcc-2d4b533de43c04ee313d654c64c52cbe4d948d71.zip
gcc-2d4b533de43c04ee313d654c64c52cbe4d948d71.tar.gz
gcc-2d4b533de43c04ee313d654c64c52cbe4d948d71.tar.bz2
New tests from Klaus-Georg.
From-SVN: r20818
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb132.C27
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb133.C16
2 files changed, 43 insertions, 0 deletions
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 0000000..5c84b76
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C
@@ -0,0 +1,27 @@
+// Build don't link
+// From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
+// 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 <std/bastring.h>.
+//
+// They vanish if the declaration of a::b is taken out.
+
+#include <string>
+
+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 0000000..f212252
--- /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 <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
+// Reported against EGCS snaps 98/06/28.
+
+int main()
+{
+ try {
+ }
+ catch (bad_alloc) { // ERROR - parse error
+ return 1;
+ }
+ return 0;
+}
+
+