]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/shift_left_imm_long_1.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
, svuint8_t u8
, svint16_t s16
, svuint16_t u16
,
10 svint32_t s32
, svuint32_t u32
, svint64_t s64
, svuint64_t u64
,
11 svfloat16_t f16
, svfloat32_t f32
, svfloat64_t f64
, int x
)
14 s16
= svshllb (s8
, x
); /* { dg-error {argument 2 of 'svshllb' must be an integer constant expression} } */
15 s16
= svshllb (s8
, one
); /* { dg-error {argument 2 of 'svshllb' must be an integer constant expression} } */
16 s16
= svshllb (s8
, -1); /* { dg-error {passing -1 to argument 2 of 'svshllb', which expects a value in the range \[0, 7\]} } */
17 s16
= svshllb (s8
, 0.0);
18 s16
= svshllb (s8
, 0);
19 s16
= svshllb (s8
, 1);
20 s16
= svshllb (s8
, 1 + 1);
21 s16
= svshllb (s8
, 7);
22 s16
= svshllb (s8
, 7.2);
23 s16
= svshllb (s8
, 8); /* { dg-error {passing 8 to argument 2 of 'svshllb', which expects a value in the range \[0, 7\]} } */
24 s16
= svshllb (s8
, 8.2); /* { dg-error {passing 8 to argument 2 of 'svshllb', which expects a value in the range \[0, 7\]} } */
25 s16
= svshllb (s8
, (1ULL << 62) + 1); /* { dg-error {passing [^ ]* to argument 2 of 'svshllb', which expects a value in the range \[0, 7\]} } */
26 u16
= svshllb (u8
, -1); /* { dg-error {passing -1 to argument 2 of 'svshllb', which expects a value in the range \[0, 7\]} } */
27 u16
= svshllb (u8
, 0);
28 u16
= svshllb (u8
, 1);
29 u16
= svshllb (u8
, 7);
30 u16
= svshllb (u8
, 8); /* { dg-error {passing 8 to argument 2 of 'svshllb', which expects a value in the range \[0, 7\]} } */
31 s32
= svshllb (s16
, -1); /* { dg-error {passing -1 to argument 2 of 'svshllb', which expects a value in the range \[0, 15\]} } */
32 s32
= svshllb (s16
, 0);
33 s32
= svshllb (s16
, 1);
34 s32
= svshllb (s16
, 15);
35 s32
= svshllb (s16
, 16); /* { dg-error {passing 16 to argument 2 of 'svshllb', which expects a value in the range \[0, 15\]} } */
36 u32
= svshllb (u16
, -1); /* { dg-error {passing -1 to argument 2 of 'svshllb', which expects a value in the range \[0, 15\]} } */
37 u32
= svshllb (u16
, 0);
38 u32
= svshllb (u16
, 1);
39 u32
= svshllb (u16
, 15);
40 u32
= svshllb (u16
, 16); /* { dg-error {passing 16 to argument 2 of 'svshllb', which expects a value in the range \[0, 15\]} } */
41 s64
= svshllb (s32
, -1); /* { dg-error {passing -1 to argument 2 of 'svshllb', which expects a value in the range \[0, 31\]} } */
42 s64
= svshllb (s32
, 0);
43 s64
= svshllb (s32
, 1);
44 s64
= svshllb (s32
, 31);
45 s64
= svshllb (s32
, 32); /* { dg-error {passing 32 to argument 2 of 'svshllb', which expects a value in the range \[0, 31\]} } */
46 u64
= svshllb (u32
, -1); /* { dg-error {passing -1 to argument 2 of 'svshllb', which expects a value in the range \[0, 31\]} } */
47 u64
= svshllb (u32
, 0);
48 u64
= svshllb (u32
, 1);
49 u64
= svshllb (u32
, 31);
50 u64
= svshllb (u32
, 32); /* { dg-error {passing 32 to argument 2 of 'svshllb', which expects a value in the range \[0, 31\]} } */
51 svshllb (s64
, -1); /* { dg-error {'svshllb' has no form that takes 'svint64_t' arguments} } */
52 svshllb (u64
, -1); /* { dg-error {'svshllb' has no form that takes 'svuint64_t' arguments} } */
53 svshllb (pg
, -1); /* { dg-error {'svshllb' has no form that takes 'svbool_t' arguments} } */
54 svshllb (f16
, -1); /* { dg-error {'svshllb' has no form that takes 'svfloat16_t' arguments} } */
55 svshllb (f32
, -1); /* { dg-error {'svshllb' has no form that takes 'svfloat32_t' arguments} } */
56 svshllb (f64
, -1); /* { dg-error {'svshllb' has no form that takes 'svfloat64_t' arguments} } */