gcc/testsuite/gcc.dg/torture/pr48343.c
raw| 1 | /* PR debug/48343 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-fcompare-debug" } */ |
| 4 | |
| 5 | void foo (unsigned char *, unsigned char *); |
| 6 | |
| 7 | void |
| 8 | test (unsigned int x, int y) |
| 9 | { |
| 10 | unsigned int i, j = 0, k; |
| 11 | unsigned char s[256], t[64]; |
| 12 | foo (s, t); |
| 13 | t[0] = y; |
| 14 | for (i = 0; i < 256; i++) |
| 15 | { |
| 16 | j = (j + s[i] + t[i % x]) & 0xff; |
| 17 | k = i; i = j; j = k; |
| 18 | } |
| 19 | } |