| 1 |
/* { dg-do compile } */ |
| 2 |
|
| 3 |
#include <arm_sve.h> |
| 4 |
|
| 5 |
void |
| 6 |
f1 (svbool_t pg, svint8_t s8, svuint8_t u8, svint16_t s16, svuint16_t u16, |
| 7 |
svfloat16_t f16, svint32_t s32, svuint32_t u32, svfloat32_t f32, |
| 8 |
svint64_t s64, svuint64_t u64, svfloat64_t f64, int i) |
| 9 |
{ |
| 10 |
svext (pg, pg, 0); /* { dg-error {'svext' has no form that takes 'svbool_t' arguments} } */ |
| 11 |
svext (s8, s8, i); /* { dg-error {argument 3 of 'svext' must be an integer constant expression} } */ |
| 12 |
|
| 13 |
svext (s8, s8, -1); /* { dg-error {passing -1 to argument 3 of 'svext', which expects a value in the range \[0, 255\]} } */ |
| 14 |
svext (s8, s8, 0); |
| 15 |
svext (s8, s8, 255); |
| 16 |
svext (s8, s8, 256); /* { dg-error {passing 256 to argument 3 of 'svext', which expects a value in the range \[0, 255\]} } */ |
| 17 |
|
| 18 |
svext (u8, u8, -1); /* { dg-error {passing -1 to argument 3 of 'svext', which expects a value in the range \[0, 255\]} } */ |
| 19 |
svext (u8, u8, 0); |
| 20 |
svext (u8, u8, 255); |
| 21 |
svext (u8, u8, 256); /* { dg-error {passing 256 to argument 3 of 'svext', which expects a value in the range \[0, 255\]} } */ |
| 22 |
|
| 23 |
svext (s16, s16, -1); /* { dg-error {passing -1 to argument 3 of 'svext', which expects a value in the range \[0, 127\]} } */ |
| 24 |
svext (s16, s16, 0); |
| 25 |
svext (s16, s16, 127); |
| 26 |
svext (s16, s16, 128); /* { dg-error {passing 128 to argument 3 of 'svext', which expects a value in the range \[0, 127\]} } */ |
| 27 |
|
| 28 |
svext (u16, u16, -1); /* { dg-error {passing -1 to argument 3 of 'svext', which expects a value in the range \[0, 127\]} } */ |
| 29 |
svext (u16, u16, 0); |
| 30 |
svext (u16, u16, 127); |
| 31 |
svext (u16, u16, 128); /* { dg-error {passing 128 to argument 3 of 'svext', which expects a value in the range \[0, 127\]} } */ |
| 32 |
|
| 33 |
svext (f16, f16, -1); /* { dg-error {passing -1 to argument 3 of 'svext', which expects a value in the range \[0, 127\]} } */ |
| 34 |
svext (f16, f16, 0); |
| 35 |
svext (f16, f16, 127); |
| 36 |
svext (f16, f16, 128); /* { dg-error {passing 128 to argument 3 of 'svext', which expects a value in the range \[0, 127\]} } */ |
| 37 |
|
| 38 |
svext (s32, s32, -1); /* { dg-error {passing -1 to argument 3 of 'svext', which expects a value in the range \[0, 63\]} } */ |
| 39 |
svext (s32, s32, 0); |
| 40 |
svext (s32, s32, 63); |
| 41 |
svext (s32, s32, 64); /* { dg-error {passing 64 to argument 3 of 'svext', which expects a value in the range \[0, 63\]} } */ |
| 42 |
|
| 43 |
svext (u32, u32, -1); /* { dg-error {passing -1 to argument 3 of 'svext', which expects a value in the range \[0, 63\]} } */ |
| 44 |
svext (u32, u32, 0); |
| 45 |
svext (u32, u32, 63); |
| 46 |
svext (u32, u32, 64); /* { dg-error {passing 64 to argument 3 of 'svext', which expects a value in the range \[0, 63\]} } */ |
| 47 |
|
| 48 |
svext (f32, f32, -1); /* { dg-error {passing -1 to argument 3 of 'svext', which expects a value in the range \[0, 63\]} } */ |
| 49 |
svext (f32, f32, 0); |
| 50 |
svext (f32, f32, 63); |
| 51 |
svext (f32, f32, 64); /* { dg-error {passing 64 to argument 3 of 'svext', which expects a value in the range \[0, 63\]} } */ |
| 52 |
|
| 53 |
svext (s64, s64, -1); /* { dg-error {passing -1 to argument 3 of 'svext', which expects a value in the range \[0, 31\]} } */ |
| 54 |
svext (s64, s64, 0); |
| 55 |
svext (s64, s64, 31); |
| 56 |
svext (s64, s64, 32); /* { dg-error {passing 32 to argument 3 of 'svext', which expects a value in the range \[0, 31\]} } */ |
| 57 |
|
| 58 |
svext (u64, u64, -1); /* { dg-error {passing -1 to argument 3 of 'svext', which expects a value in the range \[0, 31\]} } */ |
| 59 |
svext (u64, u64, 0); |
| 60 |
svext (u64, u64, 31); |
| 61 |
svext (u64, u64, 32); /* { dg-error {passing 32 to argument 3 of 'svext', which expects a value in the range \[0, 31\]} } */ |
| 62 |
|
| 63 |
svext (f64, f64, -1); /* { dg-error {passing -1 to argument 3 of 'svext', which expects a value in the range \[0, 31\]} } */ |
| 64 |
svext (f64, f64, 0); |
| 65 |
svext (f64, f64, 31); |
| 66 |
svext (f64, f64, 32); /* { dg-error {passing 32 to argument 3 of 'svext', which expects a value in the range \[0, 31\]} } */ |
| 67 |
} |