gcc/testsuite/gcc.c-torture/execute/pr117498.c
raw| 1 | /* PR middle-end/117498 */ |
| 2 | |
| 3 | int a, d, f; |
| 4 | char g; |
| 5 | volatile int c = 1; |
| 6 | |
| 7 | int |
| 8 | foo () |
| 9 | { |
| 10 | if (c == 0) |
| 11 | return -1; |
| 12 | return 1; |
| 13 | } |
| 14 | |
| 15 | void |
| 16 | bar (int h, int i, char *k, char *m) |
| 17 | { |
| 18 | for (; d < i; d += 2) |
| 19 | for (int j = 0; j < h; j++) |
| 20 | m[j] = k[4 * j]; |
| 21 | } |
| 22 | |
| 23 | void |
| 24 | baz (long h) |
| 25 | { |
| 26 | char n = 0; |
| 27 | bar (h, 4, &n, &g); |
| 28 | } |
| 29 | |
| 30 | int |
| 31 | main () |
| 32 | { |
| 33 | f = foo (); |
| 34 | baz ((unsigned char) f - 4); |
| 35 | } |