blob: eac5743b956d59484075cd5014358e5be9758433 [file] [log] [blame]
// { dg-do run }
// { dg-additional-options -fno-delete-dead-exceptions }
int x, y;
int __attribute__((pure,noinline)) foo () { if (x) throw 1; return y; }
int __attribute__((noinline)) bar()
{
int a[2];
x = 1;
try {
int res = foo ();
a[0] = res;
} catch (...) {
return 0;
}
return 1;
}
int main()
{
if (bar ())
__builtin_abort ();
return 0;
}