Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2
3 #include <arm_sve.h>
4
5 #pragma GCC target "+sve2p1"
6
7 void
8 f1 (svbool_t pg, svint8_t s8, svfloat16_t f16, svfloat32_t f32,
9 svfloat64_t f64, svint32_t s32, int i)
10 {
11 svdup_laneq (f32); /* { dg-error {too few arguments to function 'svdup_laneq'} } */
12 svdup_laneq (f32, 0, 0); /* { dg-error {too many arguments to function 'svdup_laneq'} } */
13 svdup_laneq (pg, 0); /* { dg-error {'svdup_laneq' has no form that takes 'svbool_t' arguments} } */
14 svdup_laneq (1, 0); /* { dg-error {passing 'int' to argument 1 of 'svdup_laneq', which expects an SVE type rather than a scalar} } */
15 svdup_laneq (f32, s32); /* { dg-error {argument 2 of 'svdup_laneq' must be an integer constant expression} } */
16 svdup_laneq (f32, i); /* { dg-error {argument 2 of 'svdup_laneq' must be an integer constant expression} } */
17
18 svdup_laneq (s8, 0);
19 svdup_laneq (s8, 15);
20 svdup_laneq (s8, 16); /* { dg-error {passing 16 to argument 2 of 'svdup_laneq', which expects a value in the range \[0, 15\]} } */
21 svdup_laneq (s8, -1); /* { dg-error {passing -1 to argument 2 of 'svdup_laneq', which expects a value in the range \[0, 15\]} } */
22
23 svdup_laneq (f16, 0);
24 svdup_laneq (f16, 7);
25 svdup_laneq (f16, 8); /* { dg-error {passing 8 to argument 2 of 'svdup_laneq', which expects a value in the range \[0, 7\]} } */
26 svdup_laneq (f16, -1); /* { dg-error {passing -1 to argument 2 of 'svdup_laneq', which expects a value in the range \[0, 7\]} } */
27
28 svdup_laneq (f32, 0);
29 svdup_laneq (f32, 3);
30 svdup_laneq (f32, 4); /* { dg-error {passing 4 to argument 2 of 'svdup_laneq', which expects a value in the range \[0, 3\]} } */
31 svdup_laneq (f32, -1); /* { dg-error {passing -1 to argument 2 of 'svdup_laneq', which expects a value in the range \[0, 3\]} } */
32
33 svdup_laneq (s32, 0);
34 svdup_laneq (s32, 3);
35 svdup_laneq (s32, 4); /* { dg-error {passing 4 to argument 2 of 'svdup_laneq', which expects a value in the range \[0, 3\]} } */
36 svdup_laneq (s32, -1); /* { dg-error {passing -1 to argument 2 of 'svdup_laneq', which expects a value in the range \[0, 3\]} } */
37
38 svdup_laneq (f64, 0);
39 svdup_laneq (f64, 1);
40 svdup_laneq (f64, 2); /* { dg-error {passing 2 to argument 2 of 'svdup_laneq', which expects a value in the range \[0, 1\]} } */
41 svdup_laneq (f64, -1); /* { dg-error {passing -1 to argument 2 of 'svdup_laneq', which expects a value in the range \[0, 1\]} } */
42 }