2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.eh / catch14.C
blob7addb8827b258d1fdd13b287998e0c37381cd69f
1 // { dg-do assemble  }
2 // { dg-options "-O1" }
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Jakub Jelinek 2 May 2001 <jakub@redhat.com>
7 void foo();
9 struct A {
10   A (int x) { };
11   ~A() {
12     try {
13       foo ();
14     } catch (...) { }
15   };
18 struct B;
20 B *x;
22 struct B {
23   void a();
24   void b();
25   static B* c() {
26     A y = 0;
27     return x;
28   };
31 void B::a() {
32   c()->b();