diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/eh/dead1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/eh/dead1.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/eh/dead1.C b/gcc/testsuite/g++.dg/eh/dead1.C new file mode 100644 index 000000000..88ae92264 --- /dev/null +++ b/gcc/testsuite/g++.dg/eh/dead1.C @@ -0,0 +1,20 @@ +// PR 6320 +// Rechained the MUST_NOT_THROW region in the wrong order wrt the +// TRY/CATCH while removing them and got confused. +// { dg-do compile } + +struct S { + ~S(); +}; + +void foo() +{ + try { + return; + } + catch (int) { + } + catch (...) { + S s; + } +} |