gcc/testsuite/gcc.dg/torture/pr115492.c
raw| 1 | /* { dg-do run } */ |
| 2 | |
| 3 | int a = 2, b=0, *c = &a, *d = &a, e=0; |
| 4 | [[gnu::noipa]] |
| 5 | void f(int) {} |
| 6 | [[gnu::noipa]] |
| 7 | int h(int *k) { |
| 8 | int ***j; |
| 9 | if (b) { |
| 10 | *j = &k; // Note the unintialized j is used here |
| 11 | // but since it is conditional and b is always zero, there should no |
| 12 | // effect otherwise. |
| 13 | ***j; |
| 14 | } |
| 15 | f(*k); |
| 16 | *d = e; |
| 17 | return *k; |
| 18 | } |
| 19 | int main() { if (h(c)) __builtin_abort(); } |