gcc/testsuite/g++.dg/torture/pr60131.C
raw| 1 | // { dg-do compile } |
| 2 | struct A { short a; }; |
| 3 | int **b; |
| 4 | unsigned long c; |
| 5 | |
| 6 | bool foo (); |
| 7 | unsigned bar (unsigned i); |
| 8 | extern void baz () __attribute__((noreturn)); |
| 9 | |
| 10 | int * |
| 11 | test (unsigned x, struct A *y) |
| 12 | { |
| 13 | unsigned v; |
| 14 | if (foo () || y[x].a == -1) |
| 15 | { |
| 16 | c = bar (x); |
| 17 | return 0; |
| 18 | } |
| 19 | v = y[x].a; |
| 20 | if (v >= 23) |
| 21 | baz (); |
| 22 | return b[v]; |
| 23 | } |