c++: Implement __is_nothrow_invocable built-in trait
[official-gcc.git] / gcc / testsuite / g++.dg / pr97627.C
blob81466dc3b81adc8b29b3a9e1ec17f439996dd5c9
1 /* PR tree-optimization/97627.  */
2 /* { dg-do run } */
4 struct S { unsigned short x, y; } m = { 1, 0 };
6 __attribute__((noipa)) void
7 baz (int x, int y)
9   if (x != 0 || y != 1)
10     __builtin_abort ();
13 __attribute__((noipa)) void
14 bar ()
16   throw 1;
19 void
20 foo ()
22   while (1)
23     {
24       int a = m.x + 1;
25       int b = m.y + 1;
26       for (int c = 0; c < a; c++)
27         for (int d = 0; d < b; d++)
28           baz (d, b);
29       bar ();
30     }
33 int
34 main ()
36   try
37     {
38       foo ();
39     }
40   catch (int)
41     {
42     }
43   return 0;