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 7void foo(); 8 9struct A { 10 A (int x) { }; 11 ~A() { 12 try { 13 foo (); 14 } catch (...) { } 15 }; 16}; 17 18struct B; 19 20B *x; 21 22struct B { 23 void a(); 24 void b(); 25 static B* c() { 26 A y = 0; 27 return x; 28 }; 29}; 30 31void B::a() { 32 c()->b(); 33} 34