Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-options "-std=c99" } */
3
4 #include <arm_sve.h>
5
6 #pragma GCC target ("arch=armv8.2-a+sve2")
7
8 struct s { signed char x; };
9
10 svuint64_t
11 f1 (svbool_t pg, signed char *s8_ptr, short *s16_ptr,
12 int32_t *s32_ptr, uint32_t *u32_ptr, float *f32_ptr,
13 int64_t *s64_ptr, uint64_t *u64_ptr, double *f64_ptr,
14 void *void_ptr, struct s *s_ptr, _Complex float *cf32_ptr, int **ptr_ptr,
15 svint8_t s8, svint16_t s16,
16 svint32_t s32, svuint32_t u32, svfloat32_t f32,
17 svint64_t s64, svuint64_t u64, svfloat64_t f64)
18 {
19 svldnt1_gather_index (pg, s64_ptr); /* { dg-error {too few arguments to function 'svldnt1_gather_index'} } */
20 svldnt1_gather_index (pg, s64_ptr, s64, 0); /* { dg-error {too many arguments to function 'svldnt1_gather_index'} } */
21 svldnt1_gather_index (0, s64_ptr, s64); /* { dg-error {passing 'int' to argument 1 of 'svldnt1_gather_index', which expects 'svbool_t'} } */
22 svldnt1_gather_index (pg, 0, s64); /* { dg-error {passing 'int' to argument 2 of 'svldnt1_gather_index', which expects a pointer type} } */
23 svldnt1_gather_index (pg, (uint64_t *) 0, s64);
24 svldnt1_gather_index (pg, void_ptr, s64); /* { dg-error {passing 'void \*' to argument 2 of 'svldnt1_gather_index', but 'void' is not a valid SVE element type} } */
25 svldnt1_gather_index (pg, s_ptr, s64); /* { dg-error {passing 'struct s \*' to argument 2 of 'svldnt1_gather_index', but 'struct s' is not a valid SVE element type} } */
26 svldnt1_gather_index (pg, cf32_ptr, s32); /* { dg-error {passing '_Complex float \*' to argument 2 of 'svldnt1_gather_index', but 'complex float' is not a valid SVE element type} } */
27 svldnt1_gather_index (pg, ptr_ptr, u64); /* { dg-error {passing 'int \*\*' to argument 2 of 'svldnt1_gather_index', but 'int \*' is not a valid SVE element type} } */
28 svldnt1_gather_index (pg, u32, 0); /* { dg-error {passing 'svuint32_t' to argument 2 of 'svldnt1_gather_index', which expects a pointer type} } */
29 /* { dg-message {an explicit type suffix is needed when using a vector of base addresses} "" { target *-*-* } .-1 } */
30 svldnt1_gather_index (pg, u64, 0); /* { dg-error {passing 'svuint64_t' to argument 2 of 'svldnt1_gather_index', which expects a pointer type} } */
31 /* { dg-message {an explicit type suffix is needed when using a vector of base addresses} "" { target *-*-* } .-1 } */
32
33 svldnt1_gather_index (pg, s8_ptr, s8); /* { dg-error {passing 'signed char \*' to argument 2 of 'svldnt1_gather_index', which expects a pointer to 32-bit or 64-bit elements} } */
34 svldnt1_gather_index (pg, s8_ptr, s64); /* { dg-error {passing 'signed char \*' to argument 2 of 'svldnt1_gather_index', which expects a pointer to 32-bit or 64-bit elements} } */
35 svldnt1_gather_index (pg, s16_ptr, s16); /* { dg-error {passing 'short( int)? \*' to argument 2 of 'svldnt1_gather_index', which expects a pointer to 32-bit or 64-bit elements} } */
36 svldnt1_gather_index (pg, s16_ptr, s64); /* { dg-error {passing 'short( int)? \*' to argument 2 of 'svldnt1_gather_index', which expects a pointer to 32-bit or 64-bit elements} } */
37
38 svldnt1_gather_index (pg, s32_ptr, s32); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svint32_t'} } */
39 svldnt1_gather_index (pg, s32_ptr, u32); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svint32_t'} } */
40 svldnt1_gather_index (pg, s32_ptr, f32); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svint32_t'} } */
41 svldnt1_gather_index (pg, s32_ptr, s64); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svint32_t'} } */
42
43 svldnt1_gather_index (pg, u32_ptr, s32); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svuint32_t'} } */
44 svldnt1_gather_index (pg, u32_ptr, u32); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svuint32_t'} } */
45 svldnt1_gather_index (pg, u32_ptr, f32); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svuint32_t'} } */
46 svldnt1_gather_index (pg, u32_ptr, s64); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svuint32_t'} } */
47
48 svldnt1_gather_index (pg, f32_ptr, s32); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svfloat32_t'} } */
49 svldnt1_gather_index (pg, f32_ptr, u32); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svfloat32_t'} } */
50 svldnt1_gather_index (pg, f32_ptr, f32); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svfloat32_t'} } */
51 svldnt1_gather_index (pg, f32_ptr, s64); /* { dg-error {'svldnt1_gather_index' does not support 32-bit vector type 'svfloat32_t'} } */
52
53 svldnt1_gather_index (pg, s64_ptr, s32); /* { dg-error {passing 'svint32_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svint64_t' expects a vector of 64-bit integers} } */
54 svldnt1_gather_index (pg, s64_ptr, u32); /* { dg-error {passing 'svuint32_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svint64_t' expects a vector of 64-bit integers} } */
55 svldnt1_gather_index (pg, s64_ptr, f32); /* { dg-error {passing 'svfloat32_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svint64_t' expects a vector of 64-bit integers} } */
56 svldnt1_gather_index (pg, s64_ptr, s64);
57 svldnt1_gather_index (pg, s64_ptr, u64);
58 svldnt1_gather_index (pg, s64_ptr, f64); /* { dg-error {passing 'svfloat64_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svint64_t' expects a vector of 64-bit integers} } */
59
60 svldnt1_gather_index (pg, u64_ptr, s32); /* { dg-error {passing 'svint32_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svuint64_t' expects a vector of 64-bit integers} } */
61 svldnt1_gather_index (pg, u64_ptr, u32); /* { dg-error {passing 'svuint32_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svuint64_t' expects a vector of 64-bit integers} } */
62 svldnt1_gather_index (pg, u64_ptr, f32); /* { dg-error {passing 'svfloat32_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svuint64_t' expects a vector of 64-bit integers} } */
63 svldnt1_gather_index (pg, u64_ptr, s64);
64 svldnt1_gather_index (pg, u64_ptr, u64);
65 svldnt1_gather_index (pg, u64_ptr, f64); /* { dg-error {passing 'svfloat64_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svuint64_t' expects a vector of 64-bit integers} } */
66
67 svldnt1_gather_index (pg, f64_ptr, s32); /* { dg-error {passing 'svint32_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svfloat64_t' expects a vector of 64-bit integers} } */
68 svldnt1_gather_index (pg, f64_ptr, u32); /* { dg-error {passing 'svuint32_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svfloat64_t' expects a vector of 64-bit integers} } */
69 svldnt1_gather_index (pg, f64_ptr, f32); /* { dg-error {passing 'svfloat32_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svfloat64_t' expects a vector of 64-bit integers} } */
70 svldnt1_gather_index (pg, f64_ptr, s64);
71 svldnt1_gather_index (pg, f64_ptr, u64);
72 svldnt1_gather_index (pg, f64_ptr, f64); /* { dg-error {passing 'svfloat64_t' to argument 3 of 'svldnt1_gather_index', which when loading 'svfloat64_t' expects a vector of 64-bit integers} } */
73
74 return svldnt1_gather_index (pg, s64_ptr, s64); /* { dg-error {incompatible types when returning type 'svint64_t' but 'svuint64_t' was expected} } */
75 }