gcc/testsuite/gcc.target/aarch64/simd/vset_lane_s16_const_1.c
raw| 1 | /* Test error message when passing a non-constant value in as a lane index. */ |
| 2 | |
| 3 | /* { dg-do assemble } */ |
| 4 | /* { dg-options "-std=c99" } */ |
| 5 | |
| 6 | #include <arm_neon.h> |
| 7 | |
| 8 | int |
| 9 | main (int argc, char **argv) |
| 10 | { |
| 11 | int16x4_t in = vcreate_s16 (0xdeadbeef00000000ULL); |
| 12 | /* { dg-error "must be a constant immediate" "" { target *-*-* } 0 } */ |
| 13 | int16x4_t out = vset_lane_s16 (65535, in, argc); |
| 14 | return vget_lane_s16 (out, 0); |
| 15 | } |