gcc/testsuite/g++.dg/ext/pr114691.C
raw| 1 | // PR c++/114691 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-O2 -Wall" } |
| 4 | |
| 5 | void qux (int); |
| 6 | int foo (int); |
| 7 | |
| 8 | void |
| 9 | bar (int x) |
| 10 | { |
| 11 | #pragma GCC novector |
| 12 | while (int y = foo (x)) // { dg-bogus "ignoring loop annotation" } |
| 13 | qux (y); |
| 14 | } |
| 15 | |
| 16 | void |
| 17 | baz (int x) |
| 18 | { |
| 19 | #pragma GCC novector |
| 20 | for (; int y = foo (x); ) // { dg-bogus "ignoring loop annotation" } |
| 21 | qux (y); |
| 22 | } |