Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/shift_right_imm_1.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-std=c99 -Wall -Wextra" } */
3
4 #include <arm_sve.h>
5
6 void
7 f1 (svbool_t pg, svuint8_t u8, svint8_t s8, svint16_t s16,
8 svint32_t s32, svint64_t s64, int x)
9 {
10 const int one = 1;
11 u8 = svasrd_x (pg, u8, 1); /* { dg-error {'svasrd_x' has no form that takes 'svuint8_t' arguments} } */
12 s8 = svasrd_x (pg, s8, x); /* { dg-error {argument 3 of 'svasrd_x' must be an integer constant expression} } */
13 s8 = svasrd_x (pg, s8, one); /* { dg-error {argument 3 of 'svasrd_x' must be an integer constant expression} } */
14 s8 = svasrd_x (pg, s8, 0.4); /* { dg-error {passing 0 to argument 3 of 'svasrd_x', which expects a value in the range \[1, 8\]} } */
15 s8 = svasrd_x (pg, s8, 1.0);
16 s8 = svasrd_x (pg, s8, 0); /* { dg-error {passing 0 to argument 3 of 'svasrd_x', which expects a value in the range \[1, 8\]} } */
17 s8 = svasrd_x (pg, s8, 1);
18 s8 = svasrd_x (pg, s8, 1 + 1);
19 s8 = svasrd_x (pg, s8, 8);
20 s8 = svasrd_x (pg, s8, 9); /* { dg-error {passing 9 to argument 3 of 'svasrd_x', which expects a value in the range \[1, 8\]} } */
21 s8 = svasrd_x (pg, s8, (1ULL << 62) + 1); /* { dg-error {passing [^ ]* to argument 3 of 'svasrd_x', which expects a value in the range \[1, 8\]} } */
22 s16 = svasrd_x (pg, s16, 0); /* { dg-error {passing 0 to argument 3 of 'svasrd_x', which expects a value in the range \[1, 16\]} } */
23 s16 = svasrd_x (pg, s16, 1);
24 s16 = svasrd_x (pg, s16, 16);
25 s16 = svasrd_x (pg, s16, 17); /* { dg-error {passing 17 to argument 3 of 'svasrd_x', which expects a value in the range \[1, 16\]} } */
26 s32 = svasrd_x (pg, s32, 0); /* { dg-error {passing 0 to argument 3 of 'svasrd_x', which expects a value in the range \[1, 32\]} } */
27 s32 = svasrd_x (pg, s32, 1);
28 s32 = svasrd_x (pg, s32, 32);
29 s32 = svasrd_x (pg, s32, 33); /* { dg-error {passing 33 to argument 3 of 'svasrd_x', which expects a value in the range \[1, 32\]} } */
30 s64 = svasrd_x (pg, s64, 0); /* { dg-error {passing 0 to argument 3 of 'svasrd_x', which expects a value in the range \[1, 64\]} } */
31 s64 = svasrd_x (pg, s64, 1);
32 s64 = svasrd_x (pg, s64, 64);
33 s64 = svasrd_x (pg, s64, 65); /* { dg-error {passing 65 to argument 3 of 'svasrd_x', which expects a value in the range \[1, 64\]} } */
34 }