diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.eh/catch14.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.eh/catch14.C | 33 |
1 files changed, 33 insertions, 0 deletions
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 000000000..7addb8827 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.eh/catch14.C @@ -0,0 +1,33 @@ +// { dg-do assemble } +// { dg-options "-O1" } +// Copyright (C) 2001 Free Software Foundation, Inc. +// Contributed by Jakub Jelinek 2 May 2001 <jakub@redhat.com> + + +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(); +} |