re PR c++/46364 (basic_string.h:541:32: internal compiler error: Segmentation fault)
authorRichard Guenther <rguenther@suse.de>
Mon, 18 Apr 2011 14:22:35 +0000 (14:22 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 18 Apr 2011 14:22:35 +0000 (14:22 +0000)
2011-04-18  Richard Guenther  <rguenther@suse.de>

PR middle-end/46364
* g++.dg/torture/pr46364.C: New testcase.

From-SVN: r172649

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr46364.C [new file with mode: 0644]

index b8a80b8f4344205b0bef56d1a0900aa1e7c20ef4..cedb20fe9b48c82524a2a96e45b46ccc328309fb 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-18  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/46364
+       * g++.dg/torture/pr46364.C: New testcase.
+
 2011-04-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * obj-c++.dg/dwarf-2.mm: Skip on alpha*-dec-osf*.
diff --git a/gcc/testsuite/g++.dg/torture/pr46364.C b/gcc/testsuite/g++.dg/torture/pr46364.C
new file mode 100644 (file)
index 0000000..8098991
--- /dev/null
@@ -0,0 +1,20 @@
+// { dg-do compile }
+#include <string>
+
+void a() throw (int);
+void b(std::string const &);
+
+void c(std::string *e)
+{
+  b("");
+
+  try {
+      a();
+  } catch (...) {
+      *e = "";
+  }
+}
+
+void d() {
+    c(0);
+}