1 /* { dg-do compile } */
2
3 #include <arm_sve.h>
4
5 #pragma GCC target ("arch=armv8.2-a+sve2")
6
7 void
f1(svbool_t pg,svint8_t s8,svuint8_t u8,svint16_t s16,svuint16_t u16,svint32_t s32,svuint32_t u32,svint64_t s64,svuint64_t u64,svfloat32_t f32,int x)8 f1 (svbool_t pg, svint8_t s8, svuint8_t u8,
9 svint16_t s16, svuint16_t u16,
10 svint32_t s32, svuint32_t u32,
11 svint64_t s64, svuint64_t u64,
12 svfloat32_t f32, int x)
13 {
14 const int one = 1;
15 svqshrunb (s16); /* { dg-error {too few arguments to function 'svqshrunb'} } */
16 svqshrunb (s16, s16, 1); /* { dg-error {too many arguments to function 'svqshrunb'} } */
17
18 svqshrunb (s16, x); /* { dg-error {argument 2 of 'svqshrunb' must be an integer constant expression} } */
19 svqshrunb (s16, one); /* { dg-error {argument 2 of 'svqshrunb' must be an integer constant expression} } */
20 svqshrunb (s16, 0.4); /* { dg-error {passing 0 to argument 2 of 'svqshrunb', which expects a value in the range \[1, 8\]} } */
21 svqshrunb (s16, 1.0);
22
23 svqshrunb (pg, 1); /* { dg-error {'svqshrunb' has no form that takes 'svbool_t' arguments} } */
24
25 svqshrunb (u8, -1); /* { dg-error {'svqshrunb' has no form that takes 'svuint8_t' arguments} } */
26 svqshrunb (u8, 1); /* { dg-error {'svqshrunb' has no form that takes 'svuint8_t' arguments} } */
27 svqshrunb (u8, 100); /* { dg-error {'svqshrunb' has no form that takes 'svuint8_t' arguments} } */
28
29 svqshrunb (s8, 1); /* { dg-error {'svqshrunb' has no form that takes 'svint8_t' arguments} } */
30
31 svqshrunb (u16, 1); /* { dg-error {'svqshrunb' has no form that takes 'svuint16_t' arguments} } */
32
33 svqshrunb (s16, -1); /* { dg-error {passing -1 to argument 2 of 'svqshrunb', which expects a value in the range \[1, 8\]} } */
34 svqshrunb (s16, 0); /* { dg-error {passing 0 to argument 2 of 'svqshrunb', which expects a value in the range \[1, 8\]} } */
35 svqshrunb (s16, 1);
36 svqshrunb (s16, 8);
37 svqshrunb (s16, 9); /* { dg-error {passing 9 to argument 2 of 'svqshrunb', which expects a value in the range \[1, 8\]} } */
38
39 svqshrunb (u32, 1); /* { dg-error {'svqshrunb' has no form that takes 'svuint32_t' arguments} } */
40
41 svqshrunb (s32, -1); /* { dg-error {passing -1 to argument 2 of 'svqshrunb', which expects a value in the range \[1, 16\]} } */
42 svqshrunb (s32, 0); /* { dg-error {passing 0 to argument 2 of 'svqshrunb', which expects a value in the range \[1, 16\]} } */
43 svqshrunb (s32, 1);
44 svqshrunb (s32, 16);
45 svqshrunb (s32, 17); /* { dg-error {passing 17 to argument 2 of 'svqshrunb', which expects a value in the range \[1, 16\]} } */
46
47 svqshrunb (u64, 1); /* { dg-error {'svqshrunb' has no form that takes 'svuint64_t' arguments} } */
48
49 svqshrunb (s64, -1); /* { dg-error {passing -1 to argument 2 of 'svqshrunb', which expects a value in the range \[1, 32\]} } */
50 svqshrunb (s64, 0); /* { dg-error {passing 0 to argument 2 of 'svqshrunb', which expects a value in the range \[1, 32\]} } */
51 svqshrunb (s64, 1);
52 svqshrunb (s64, 32);
53 svqshrunb (s64, 33); /* { dg-error {passing 33 to argument 2 of 'svqshrunb', which expects a value in the range \[1, 32\]} } */
54
55 svqshrunb (f32, 1); /* { dg-error {'svqshrunb' has no form that takes 'svfloat32_t' arguments} } */
56
57 svqshrunb (1, 1); /* { dg-error {passing 'int' to argument 1 of 'svqshrunb', which expects an SVE vector type} } */
58 }
59