gcc/testsuite/gcc.c-torture/execute/pr53160.c
raw| 1 | /* PR rtl-optimization/53160 */ |
| 2 | |
| 3 | extern void abort (void); |
| 4 | |
| 5 | int a, c = 1, d, e, g; |
| 6 | volatile int b; |
| 7 | volatile char f; |
| 8 | long h; |
| 9 | short i; |
| 10 | |
| 11 | void |
| 12 | foo (void) |
| 13 | { |
| 14 | for (e = 0; e; ++e) |
| 15 | ; |
| 16 | } |
| 17 | |
| 18 | int |
| 19 | main () |
| 20 | { |
| 21 | if (g) |
| 22 | (void) b; |
| 23 | foo (); |
| 24 | for (d = 0; d >= 0; d--) |
| 25 | { |
| 26 | short j = f; |
| 27 | int k = 0; |
| 28 | i = j ? j : j << k; |
| 29 | } |
| 30 | h = c == 0 ? 0 : i; |
| 31 | a = h; |
| 32 | if (a != 0) |
| 33 | abort (); |
| 34 | return 0; |
| 35 | } |