gcc/testsuite/gcc.c-torture/execute/pr124358.c
raw| 1 | /* PR tree-optimization/124358 */ |
| 2 | |
| 3 | [[gnu::noipa]] void |
| 4 | foo (int d) |
| 5 | { |
| 6 | static int u = 11; |
| 7 | if (d != u++) |
| 8 | __builtin_abort (); |
| 9 | } |
| 10 | |
| 11 | int |
| 12 | main () |
| 13 | { |
| 14 | int a[1][4] = { 11, 12, 13, 14 }; |
| 15 | int (*p)[4] = a; |
| 16 | for (int i = 0; i < 1; i++) |
| 17 | for (int j = 0; j < 4; j++) |
| 18 | foo (*(*(p + i) + j)); |
| 19 | } |