| 1 |
/* { dg-do compile } */ |
| 2 |
|
| 3 |
#include <arm_sve.h> |
| 4 |
|
| 5 |
#pragma GCC target ("arch=armv8.2-a+sve2") |
| 6 |
|
| 7 |
struct foo; |
| 8 |
|
| 9 |
void |
| 10 |
f1 (svbool_t pg, svint8_t s8, int8_t *s8_ptr, uint8_t *u8_ptr, |
| 11 |
uint16_t *u16_ptr, svbool_t *pg_ptr, const struct foo *foo_ptr) |
| 12 |
{ |
| 13 |
svwhilerw (u8_ptr); /* { dg-error {too few arguments to function 'svwhilerw'} } */ |
| 14 |
svwhilerw (u8_ptr, u8_ptr, u8_ptr); /* { dg-error {too many arguments to function 'svwhilerw'} } */ |
| 15 |
svwhilerw (pg, u8_ptr); /* { dg-error {passing 'svbool_t' to argument 1 of 'svwhilerw', which expects a pointer type} } */ |
| 16 |
svwhilerw (0, u8_ptr); /* { dg-error {passing 'int' to argument 1 of 'svwhilerw', which expects a pointer type} } */ |
| 17 |
svwhilerw (s8, u8_ptr); /* { dg-error {passing 'svint8_t' to argument 1 of 'svwhilerw', which expects a pointer type} } */ |
| 18 |
svwhilerw (1, u8_ptr); /* { dg-error {passing 'int' to argument 1 of 'svwhilerw', which expects a pointer type} } */ |
| 19 |
svwhilerw (pg_ptr, u8_ptr); /* { dg-error {passing 'svbool_t \*' to argument 1 of 'svwhilerw', but 'svbool_t' is not a valid SVE element type} } */ |
| 20 |
svwhilerw (foo_ptr, u8_ptr); /* { dg-error {passing 'const struct foo \*' to argument 1 of 'svwhilerw', but 'struct foo' is not a valid SVE element type} } */ |
| 21 |
svwhilerw (u8_ptr, 0); /* { dg-error {passing 'int' to argument 2 of 'svwhilerw', which expects a pointer type} } */ |
| 22 |
svwhilerw (u8_ptr, s8); /* { dg-error {passing 'svint8_t' to argument 2 of 'svwhilerw', which expects a pointer type} } */ |
| 23 |
svwhilerw (u8_ptr, u8_ptr); |
| 24 |
svwhilerw (u8_ptr, s8_ptr); /* { dg-error {passing 'int8_t \*'[^\n]* to argument 2 of 'svwhilerw', but argument 1 had type 'uint8_t \*'} } */ |
| 25 |
svwhilerw (u8_ptr, u16_ptr); /* { dg-error {passing 'uint16_t \*'[^\n]* to argument 2 of 'svwhilerw', but argument 1 had type 'uint8_t \*'} } */ |
| 26 |
svwhilerw (s8_ptr, u8_ptr); /* { dg-error {passing 'uint8_t \*'[^\n]* to argument 2 of 'svwhilerw', but argument 1 had type 'int8_t \*'} } */ |
| 27 |
} |