gcc/testsuite/gcc.dg/pr45055.c
raw| 1 | /* PR debug/45055 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-std=gnu17 -O2 -ftracer -fsched-pressure -funroll-loops -fschedule-insns -fcompare-debug" } */ |
| 4 | /* { dg-require-effective-target scheduling } */ |
| 5 | |
| 6 | int colormap[10]; |
| 7 | |
| 8 | extern int bar (); |
| 9 | |
| 10 | void |
| 11 | foo (int *img, int fp, int y, int *ptr, int depth, int c, int t, int xm) |
| 12 | { |
| 13 | int x, color, count; |
| 14 | for (; y; y--) |
| 15 | { |
| 16 | if (depth) |
| 17 | { |
| 18 | count = bar (); |
| 19 | for (x = xm; x; x--) |
| 20 | { |
| 21 | if (c != 1) |
| 22 | count = color = -1; |
| 23 | if (count == 0) |
| 24 | color = count = bar (); |
| 25 | if (color) |
| 26 | t = bar (fp); |
| 27 | *ptr++ = colormap[t]; |
| 28 | } |
| 29 | } |
| 30 | switch (*img) |
| 31 | { |
| 32 | case 1: |
| 33 | bar (); |
| 34 | case 3: |
| 35 | case -1: |
| 36 | case -3: |
| 37 | bar (); |
| 38 | case -4: |
| 39 | bar (); |
| 40 | } |
| 41 | } |
| 42 | } |