gcc/testsuite/gcc.dg/pr112618.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2" } */ |
| 3 | |
| 4 | int m, *p; |
| 5 | |
| 6 | __attribute__ ((simd)) int |
| 7 | bar (int x) |
| 8 | { |
| 9 | if (x) |
| 10 | { |
| 11 | if (m < 1) |
| 12 | for (m = 0; m < 1; ++m) |
| 13 | ++x; |
| 14 | p = &x; |
| 15 | for (;;) |
| 16 | ++m; |
| 17 | } |
| 18 | return 0; |
| 19 | } |
| 20 | |
| 21 | __attribute__ ((simd)) int |
| 22 | foo (int x) |
| 23 | { |
| 24 | bar (x); |
| 25 | return 0; |
| 26 | } |