gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr96146.c
raw| 1 | /* { dg-do run { target aarch64_sve_hw } } */ |
| 2 | /* { dg-options "-O3" } */ |
| 3 | |
| 4 | #include <arm_sve.h> |
| 5 | |
| 6 | void __attribute__ ((noipa)) |
| 7 | f (volatile int *x) |
| 8 | { |
| 9 | int i; |
| 10 | for (int i = 0; i < svcntd (); ++i) |
| 11 | *x = i; |
| 12 | } |
| 13 | |
| 14 | int |
| 15 | main (void) |
| 16 | { |
| 17 | volatile int x; |
| 18 | f (&x); |
| 19 | return 0; |
| 20 | } |