gcc/testsuite/gcc.dg/pr84875.c
raw| 1 | /* PR debug/84875 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-Os" } */ |
| 4 | /* { dg-additional-options "-fpie" { target pie } } */ |
| 5 | /* { dg-additional-options "-march=z196" { target s390*-*-* } } */ |
| 6 | |
| 7 | static long *a[100]; |
| 8 | static int b[100]; |
| 9 | long *c; |
| 10 | int d; |
| 11 | void foo (long *); |
| 12 | |
| 13 | void |
| 14 | bar () |
| 15 | { |
| 16 | long *g = c; |
| 17 | g--; |
| 18 | d = *g; |
| 19 | if (d) |
| 20 | if (b[d] < 8) |
| 21 | { |
| 22 | *(void **)g = a[d]; |
| 23 | a[d] = g; |
| 24 | b[d]++; |
| 25 | return; |
| 26 | } |
| 27 | foo (g); |
| 28 | } |