diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.eh/catchptr1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.eh/catchptr1.C | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/catchptr1.C b/gcc/testsuite/g++.old-deja/g++.eh/catchptr1.C index 3c74b8d3496..c88b36aa12b 100644 --- a/gcc/testsuite/g++.old-deja/g++.eh/catchptr1.C +++ b/gcc/testsuite/g++.old-deja/g++.eh/catchptr1.C @@ -27,6 +27,7 @@ int test0 () { return 0; } + return -1; } int test1 () @@ -44,6 +45,7 @@ int test1 () { return 0; } + return -1; } int test2 () @@ -61,6 +63,7 @@ int test2 () { return 1; } + return -1; } int test3 () @@ -78,6 +81,7 @@ int test3 () { return 1; } + return -1; } int test4 () @@ -100,6 +104,7 @@ int test4 () { return 2; } + return -1; } int test5 () @@ -116,6 +121,7 @@ int test5 () { return 1; } + return -1; } int test6 () @@ -148,6 +154,7 @@ int test6 () { return 1; } + return -1; } int test7 () @@ -172,11 +179,13 @@ int test7 () { return 3; } + return -1; } -#if 0 int test8 () { +#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 +// old-abi fails this test, by segfaulting in the runtime. try { throw (B **)0; @@ -193,8 +202,35 @@ int test8 () { return 2; } + return -1; +#endif + return 0; } + +int test9 () +{ +#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 +// old-abi fails this test, by segfaulting in the runtime. + try + { + throw (B **)0; + } + catch (C const *const *) + { + return 1; + } + catch (B const *const *) + { + return 0; + } + catch (...) + { + return 2; + } + return -1; #endif + return 0; +} static int (*tests[])() = { @@ -208,9 +244,8 @@ static int (*tests[])() = test6, test7, -#if 0 test8, -#endif + test9, NULL }; |