]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/shift_left_imm_to_uint_2.c
1 /* { dg-do compile } */
2 /* { dg-additional-options "-std=c99 -Wall -Wextra" } */
6 #pragma GCC target ( "arch=armv8.2-a+sve2" )
9 f1 ( svbool_t pg
, svint8_t s8
, svint16_t s16
, svint32_t s32
, svint64_t s64
,
13 svuint8_t u8
__attribute__ (( unused
));
14 svuint16_t u16
__attribute__ (( unused
));
15 svuint32_t u32
__attribute__ (( unused
));
16 svuint64_t u64
__attribute__ (( unused
));
17 u8
= svqshlu_n_s8_x ( pg
, s8
, x
); /* { dg-error {argument 3 of 'svqshlu_n_s8_x' must be an integer constant expression} } */
18 u8
= svqshlu_n_s8_x ( pg
, s8
, one
); /* { dg-error {argument 3 of 'svqshlu_n_s8_x' must be an integer constant expression} } */
19 u8
= svqshlu_n_s8_x ( pg
, s8
, - 1 ); /* { dg-error {passing -1 to argument 3 of 'svqshlu_n_s8_x', which expects a value in the range \[0, 7\]} } */
20 u8
= svqshlu_n_s8_x ( pg
, s8
, 0.0 );
21 u8
= svqshlu_n_s8_x ( pg
, s8
, 0 );
22 u8
= svqshlu_n_s8_x ( pg
, s8
, 1 );
23 u8
= svqshlu_n_s8_x ( pg
, s8
, 1 + 1 );
24 u8
= svqshlu_n_s8_x ( pg
, s8
, 7 );
25 u8
= svqshlu_n_s8_x ( pg
, s8
, 7.2 );
26 u8
= svqshlu_n_s8_x ( pg
, s8
, 8 ); /* { dg-error {passing 8 to argument 3 of 'svqshlu_n_s8_x', which expects a value in the range \[0, 7\]} } */
27 u8
= svqshlu_n_s8_x ( pg
, s8
, 8.2 ); /* { dg-error {passing 8 to argument 3 of 'svqshlu_n_s8_x', which expects a value in the range \[0, 7\]} } */
28 u8
= svqshlu_n_s8_x ( pg
, s8
, ( 1ULL << 62 ) + 1 ); /* { dg-error {passing [^ ]* to argument 3 of 'svqshlu_n_s8_x', which expects a value in the range \[0, 7\]} } */
29 u16
= svqshlu_n_s16_x ( pg
, s16
, - 1 ); /* { dg-error {passing -1 to argument 3 of 'svqshlu_n_s16_x', which expects a value in the range \[0, 15\]} } */
30 u16
= svqshlu_n_s16_x ( pg
, s16
, 0 );
31 u16
= svqshlu_n_s16_x ( pg
, s16
, 1 );
32 u16
= svqshlu_n_s16_x ( pg
, s16
, 15 );
33 u16
= svqshlu_n_s16_x ( pg
, s16
, 16 ); /* { dg-error {passing 16 to argument 3 of 'svqshlu_n_s16_x', which expects a value in the range \[0, 15\]} } */
34 u32
= svqshlu_n_s32_x ( pg
, s32
, - 1 ); /* { dg-error {passing -1 to argument 3 of 'svqshlu_n_s32_x', which expects a value in the range \[0, 31\]} } */
35 u32
= svqshlu_n_s32_x ( pg
, s32
, 0 );
36 u32
= svqshlu_n_s32_x ( pg
, s32
, 1 );
37 u32
= svqshlu_n_s32_x ( pg
, s32
, 31 );
38 u32
= svqshlu_n_s32_x ( pg
, s32
, 32 ); /* { dg-error {passing 32 to argument 3 of 'svqshlu_n_s32_x', which expects a value in the range \[0, 31\]} } */
39 u64
= svqshlu_n_s64_x ( pg
, s64
, - 1 ); /* { dg-error {passing -1 to argument 3 of 'svqshlu_n_s64_x', which expects a value in the range \[0, 63\]} } */
40 u64
= svqshlu_n_s64_x ( pg
, s64
, 0 );
41 u64
= svqshlu_n_s64_x ( pg
, s64
, 1 );
42 u64
= svqshlu_n_s64_x ( pg
, s64
, 63 );
43 u64
= svqshlu_n_s64_x ( pg
, s64
, 64 ); /* { dg-error {passing 64 to argument 3 of 'svqshlu_n_s64_x', which expects a value in the range \[0, 63\]} } */