diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.mike/eh40.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.mike/eh40.C | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh40.C b/gcc/testsuite/g++.old-deja/g++.mike/eh40.C new file mode 100644 index 000000000..e42b41974 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.mike/eh40.C @@ -0,0 +1,29 @@ +// { dg-do run { xfail sparc64-*-elf arm-*-pe } } +// { dg-options "-fexceptions" } + +int fail = 1; +class B { +public: + B() { throw 1; } +}; +class D : public B { +public: + D() try : B() { + fail = 1; + } catch (char c) { + fail = 1; + throw; + } catch (...) { + fail = 0; + throw; + } +}; + +main() { + try { + D d; + fail = 1; + } catch (...) { + } + return fail; +} |