diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/compat/eh/dtor1_y.C')
-rw-r--r-- | gcc/testsuite/g++.dg/compat/eh/dtor1_y.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/compat/eh/dtor1_y.C b/gcc/testsuite/g++.dg/compat/eh/dtor1_y.C new file mode 100644 index 000000000..a1ec41a27 --- /dev/null +++ b/gcc/testsuite/g++.dg/compat/eh/dtor1_y.C @@ -0,0 +1,18 @@ +extern int r; +int ad; + +#include "dtor1.h" + +A::~A () { ++ad; } + +B::~B () +try + { + throw 1; + } +catch (...) + { + if (!ad) + r = 1; + return; + } |