Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-options "-std=c99" } */
3
4 #include <arm_sve.h>
5
6 struct s { signed char x; };
7
8 svuint8_t
9 f1 (svbool_t pg, svcount_t pn,
10 signed char *s8_ptr, void *void_ptr, struct s *s_ptr,
11 float *f32_ptr, _Complex float *cf32_ptr, int **ptr_ptr)
12 {
13 svld1 (pg); /* { dg-error {too few arguments to function 'svld1'} } */
14 svld1 (pg, s8_ptr, 0); /* { dg-error {too many arguments to function 'svld1'} } */
15 svld1 (0, s8_ptr); /* { dg-error {passing 'int' to argument 1 of 'svld1', which expects 'svbool_t'} } */
16 svld1 (pn, s8_ptr); /* { dg-error {passing 'svcount_t' to argument 1 of 'svld1', which expects 'svbool_t'} } */
17 svld1 (pg, 0); /* { dg-error {passing 'int' to argument 2 of 'svld1', which expects a pointer type} } */
18 svld1 (pg, (int32_t *) 0);
19 svld1 (pg, void_ptr); /* { dg-error {passing 'void \*' to argument 2 of 'svld1', but 'void' is not a valid SVE element type} } */
20 svld1 (pg, s_ptr); /* { dg-error {passing 'struct s \*' to argument 2 of 'svld1', but 'struct s' is not a valid SVE element type} } */
21 svld1 (pg, f32_ptr);
22 svld1 (pg, cf32_ptr); /* { dg-error {passing '_Complex float \*' to argument 2 of 'svld1', but 'complex float' is not a valid SVE element type} } */
23 svld1 (pg, ptr_ptr); /* { dg-error {passing 'int \*\*' to argument 2 of 'svld1', but 'int \*' is not a valid SVE element type} } */
24 return svld1 (pg, s8_ptr); /* { dg-error {incompatible types when returning type 'svint8_t' but 'svuint8_t' was expected} } */
25 }