1 // PR tree-optimization/42890 2 // { dg-do compile } 3 4 extern "C" int puts (const char *) throw (); 5 6 struct S 7 { 8 const char *a; 9 const char **b; SS10 S (const char *s) { a = s; b = &a; } ~SS11 ~S () { puts (a); } 12 }; 13 14 void foo(int (* fn)(const char *))15foo (int (*fn) (const char *)) 16 { 17 S a ("foo"); 18 fn ("bar"); 19 } 20 21 int main()22main () 23 { 24 foo (puts); 25 } 26