gcc/testsuite/c-c++-common/ubsan/pr71403-2.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-additional-options "-fsanitize=unreachable" } */ |
| 3 | |
| 4 | char a, c; |
| 5 | short b; |
| 6 | |
| 7 | int |
| 8 | main () |
| 9 | { |
| 10 | unsigned d = 0; |
| 11 | int e = 1; |
| 12 | for (a = 0; a < 2; a++) |
| 13 | { |
| 14 | if (e) |
| 15 | c--; |
| 16 | for (; d < 2; d++) |
| 17 | for (b = 0; b; b++) |
| 18 | ; |
| 19 | e = 0; |
| 20 | } |
| 21 | __builtin_exit (0); |
| 22 | } |