Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2
3 #include <arm_sve.h>
4
5 #pragma GCC target ("arch=armv8.2-a+sve2")
6
7 void
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 svfloat16_t f16, svfloat32_t f32)
13 {
14 svaddhnt (u32, u16); /* { dg-error {too few arguments to function 'svaddhnt'} } */
15 svaddhnt (u32, u16, u16, u16); /* { dg-error {too many arguments to function 'svaddhnt'} } */
16 svaddhnt (pg, pg, pg); /* { dg-error {'svaddhnt' has no form that takes 'svbool_t' arguments} } */
17 svaddhnt (u8, u8, u8); /* { dg-error {'svaddhnt' has no form that takes 'svuint8_t' arguments} } */
18 svaddhnt (s8, s8, s8); /* { dg-error {'svaddhnt' has no form that takes 'svint8_t' arguments} } */
19 svaddhnt (u16, u16, u16); /* { dg-error {passing 'svuint16_t' instead of the expected 'svuint8_t' to argument 1 of 'svaddhnt', after passing 'svuint16_t' to argument 2} } */
20 svaddhnt (s8, u16, u16); /* { dg-error {arguments 1 and 2 of 'svaddhnt' must have the same signedness, but the values passed here have type 'svint8_t' and 'svuint16_t' respectively} } */
21 svaddhnt (pg, u16, u16); /* { dg-error {passing 'svbool_t' instead of the expected 'svuint8_t' to argument 1 of 'svaddhnt', after passing 'svuint16_t' to argument 2} } */
22 svaddhnt (u8, u16, u16);
23 svaddhnt (s8, s16, s16);
24 svaddhnt (u16, u32, u32);
25 svaddhnt (s16, s32, s32);
26 svaddhnt (u32, u64, u64);
27 svaddhnt (s32, s64, s64);
28 svaddhnt (f16, f32, f32); /* { dg-error {'svaddhnt' has no form that takes 'svfloat32_t' arguments} } */
29 svaddhnt (1, u16, u16); /* { dg-error {passing 'int' to argument 1 of 'svaddhnt', which expects an SVE type rather than a scalar} } */
30 svaddhnt (u8, 1, u16); /* { dg-error {passing 'int' to argument 2 of 'svaddhnt', which expects an SVE type rather than a scalar} } */
31 svaddhnt (u8, u16, s8); /* { dg-error {passing 'svint8_t' to argument 3 of 'svaddhnt', but argument 2 had type 'svuint16_t'} } */
32 svaddhnt (u8, u16, s16); /* { dg-error {passing 'svint16_t' to argument 3 of 'svaddhnt', but argument 2 had type 'svuint16_t'} } */
33 svaddhnt (u8, u16, u32); /* { dg-error {passing 'svuint32_t' to argument 3 of 'svaddhnt', but argument 2 had type 'svuint16_t'} } */
34 svaddhnt (u8, u16, pg); /* { dg-error {passing 'svbool_t' to argument 3 of 'svaddhnt', but argument 2 had type 'svuint16_t'} } */
35 svaddhnt (u8, u8, 0); /* { dg-error {'svaddhnt' has no form that takes 'svuint8_t' arguments} } */
36 svaddhnt (u16, u16, 0); /* { dg-error {passing 'svuint16_t' instead of the expected 'svuint8_t' to argument 1 of 'svaddhnt', after passing 'svuint16_t' to argument 2} } */
37 svaddhnt (s8, u16, 0); /* { dg-error {arguments 1 and 2 of 'svaddhnt' must have the same signedness, but the values passed here have type 'svint8_t' and 'svuint16_t' respectively} } */
38 svaddhnt (pg, u16, 0); /* { dg-error {passing 'svbool_t' instead of the expected 'svuint8_t' to argument 1 of 'svaddhnt', after passing 'svuint16_t' to argument 2} } */
39 svaddhnt (u8, u16, 0);
40 svaddhnt (u16, u32, 0);
41 svaddhnt (u32, u64, 0);
42 svaddhnt (pg, pg, 0); /* { dg-error {'svaddhnt' has no form that takes 'svbool_t' arguments} } */
43 }