Debian Codegraph @

gcc/testsuite/g++.dg/pr97627.C

raw
1 /* PR tree-optimization/97627. */
2 /* { dg-do run } */
3
4 struct S { unsigned short x, y; } m = { 1, 0 };
5
6 __attribute__((noipa)) void
7 baz (int x, int y)
8 {
9 if (x != 0 || y != 1)
10 __builtin_abort ();
11 }
12
13 __attribute__((noipa)) void
14 bar ()
15 {
16 throw 1;
17 }
18
19 void
20 foo ()
21 {
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 }
31 }
32
33 int
34 main ()
35 {
36 try
37 {
38 foo ();
39 }
40 catch (int)
41 {
42 }
43 return 0;
44 }