From de26cf808faf3bb1518d2756df69e299258febca Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 2 May 2001 23:00:00 +0200 Subject: [PATCH] catch13.C: New test. * g++.old-deja/g++.eh/catch13.C: New test. * g++.old-deja/g++.eh/catch14.C: New test. From-SVN: r41774 --- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/g++.old-deja/g++.eh/catch13.C | 19 ++++++++++++ gcc/testsuite/g++.old-deja/g++.eh/catch14.C | 33 +++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.eh/catch13.C create mode 100644 gcc/testsuite/g++.old-deja/g++.eh/catch14.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index af464e59bff2..e31db61c3a59 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2001-05-02 Jakub Jelinek + + * g++.old-deja/g++.eh/catch13.C: New test. + * g++.old-deja/g++.eh/catch14.C: New test. + 2001-05-02 Jakub Jelinek * gcc.dg/cpp/tr-define.c: New test. diff --git a/gcc/testsuite/g++.old-deja/g++.eh/catch13.C b/gcc/testsuite/g++.old-deja/g++.eh/catch13.C new file mode 100644 index 000000000000..47a0c90b9639 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.eh/catch13.C @@ -0,0 +1,19 @@ +// Copyright (C) 2001 Free Software Foundation, Inc. +// Contributed by Jakub Jelinek 2 May 2001 + +// Build don't link: +// Special g++ Options: -O2 + +struct A; + +A *foo(); + +struct A { + A *a() { try { return foo(); } catch (...) {} } + void b(); + void c(); +}; + +void A::b() { + a()->c(); +} diff --git a/gcc/testsuite/g++.old-deja/g++.eh/catch14.C b/gcc/testsuite/g++.old-deja/g++.eh/catch14.C new file mode 100644 index 000000000000..96be4640bad8 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.eh/catch14.C @@ -0,0 +1,33 @@ +// Copyright (C) 2001 Free Software Foundation, Inc. +// Contributed by Jakub Jelinek 2 May 2001 + +// Build don't link: +// Special g++ Options: -O1 + +void foo(); + +struct A { + A (int x) { }; + ~A() { + try { + foo (); + } catch (...) { } + }; +}; + +struct B; + +B *x; + +struct B { + void a(); + void b(); + static B* c() { + A y = 0; + return x; + }; +}; + +void B::a() { + c()->b(); +} -- 2.43.5