Committed to trunk and the 4.6 branch. Richard.
2011-04-18 Richard Guenther <rguent...@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); +}