[PATCH] Testcase for PR46364

Richard Guenther rguenther@suse.de
Mon Apr 18 14:39:00 GMT 2011


Committed to trunk and the 4.6 branch.

Richard.

2011-04-18  Richard Guenther  <rguenther@suse.de>

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

Index: gcc/testsuite/g++.dg/torture/pr46364.C
===================================================================
--- gcc/testsuite/g++.dg/torture/pr46364.C	(revision 0)
+++ gcc/testsuite/g++.dg/torture/pr46364.C	(revision 0)
@@ -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);
+}



More information about the Gcc-patches mailing list