1 // PR c++/20416. We correctly constructed the temporary S in foo(),
2 // but incorrectly destroyed it every time foo() was called.
3 // When using a wrapped target, there is no way to override the exit
4 // code after returning from main.
5 // { dg-do run { target unwrapped } }
6 extern "C" void abort (void);
7 extern "C" void _exit (int);
15 if (!exiting) abort ();
22 static const S &s = S();