strub: enable conditional support
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr100382.C
blobeac5743b956d59484075cd5014358e5be9758433
1 // { dg-do run }
2 // { dg-additional-options -fno-delete-dead-exceptions }
4 int x, y;
5 int __attribute__((pure,noinline)) foo () { if (x) throw 1; return y; }
7 int __attribute__((noinline)) bar()
9   int a[2];
10   x = 1;
11   try {
12     int res = foo ();
13     a[0] = res;
14   } catch (...) {
15       return 0;
16   }
17   return 1;
20 int main()
22   if (bar ())
23     __builtin_abort ();
24   return 0;