OSDN Git Service

* gcc.dg/20020201-1.c: Use cleanup-coverage_files.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.eh / catch14.C
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>
5
6
7 void foo();
8
9 struct A {
10   A (int x) { };
11   ~A() {
12     try {
13       foo ();
14     } catch (...) { }
15   };
16 };
17
18 struct B;
19
20 B *x;
21
22 struct B {
23   void a();
24   void b();
25   static B* c() {
26     A y = 0;
27     return x;
28   };
29 };
30
31 void B::a() {
32   c()->b();
33 }