1ab7736690820e3c2befaf36bb37fc7391911bb4
[gcc.git] / gcc / testsuite / c-c++-common / ubsan / pr71403-3.c
1 /* { dg-do run } */
2 /* { dg-options "-O3 -fsanitize=unreachable" } */
3
4
5 int a, b, c, d;
6
7 void
8 fn1 ()
9 {
10 for (c = 0; c < 2; c++)
11 {
12 int e, f = 1;
13 for (e = 0; e < 2; e++)
14 {
15 if (!f)
16 return;
17 for (d = 0; d; d++)
18 f = b;
19 }
20 }
21 }
22
23 int
24 main ()
25 {
26 for (; a < 1; a++)
27 {
28 fn1 ();
29 }
30 __builtin_exit (0);
31 }