diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.eh/cleanup1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.eh/cleanup1.C | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/cleanup1.C b/gcc/testsuite/g++.old-deja/g++.eh/cleanup1.C deleted file mode 100644 index 6faea269c9d..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.eh/cleanup1.C +++ /dev/null @@ -1,34 +0,0 @@ -// Bug: obj gets destroyed twice because the fixups for the return are -// inside its cleanup region. - -extern "C" int printf (const char *, ...); - -int d; - -struct myExc { }; - -struct myExcRaiser { - ~myExcRaiser() { throw myExc(); } -}; - -struct stackObj { - ~stackObj() { ++d; printf ("stackObj::~stackObj()\n"); }; -}; - -int test() -{ - myExcRaiser rais; - stackObj obj; - return 0; -} - -int main() -{ - try { - test(); - } - catch (myExc &) { - return d != 1; - } - return 1; -} |