| 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, svfloat16_t f16) |
| 10 |
{ |
| 11 |
svmatch (pg, u8); /* { dg-error {too few arguments to function 'svmatch'} } */ |
| 12 |
svmatch (pg, u8, u8, u8); /* { dg-error {too many arguments to function 'svmatch'} } */ |
| 13 |
svmatch (u8, u8, u8); /* { dg-error {passing 'svuint8_t' to argument 1 of 'svmatch', which expects 'svbool_t'} } */ |
| 14 |
svmatch (pg, pg, pg); /* { dg-error {'svmatch' has no form that takes 'svbool_t' arguments} } */ |
| 15 |
svmatch (pg, 1, u8); /* { dg-error {passing 'int' to argument 2 of 'svmatch', which expects an SVE type rather than a scalar} } */ |
| 16 |
svmatch (pg, u8, s8); /* { dg-error {passing 'svint8_t' to argument 3 of 'svmatch', but argument 2 had type 'svuint8_t'} } */ |
| 17 |
svmatch (pg, u8, u8); |
| 18 |
svmatch (pg, u8, s16); /* { dg-error {passing 'svint16_t' to argument 3 of 'svmatch', but argument 2 had type 'svuint8_t'} } */ |
| 19 |
svmatch (pg, u8, u16); /* { dg-error {passing 'svuint16_t' to argument 3 of 'svmatch', but argument 2 had type 'svuint8_t'} } */ |
| 20 |
svmatch (pg, u8, f16); /* { dg-error {passing 'svfloat16_t' to argument 3 of 'svmatch', but argument 2 had type 'svuint8_t'} } */ |
| 21 |
svmatch (pg, u8, pg); /* { dg-error {passing 'svbool_t' to argument 3 of 'svmatch', but argument 2 had type 'svuint8_t'} } */ |
| 22 |
svmatch (pg, u8, 0); /* { dg-error {passing 'int' to argument 3 of 'svmatch', which expects an SVE type rather than a scalar} } */ |
| 23 |
|
| 24 |
svmatch (pg, f16, s16); /* { dg-error {passing 'svint16_t' to argument 3 of 'svmatch', but argument 2 had type 'svfloat16_t'} } */ |
| 25 |
svmatch (pg, f16, u16); /* { dg-error {passing 'svuint16_t' to argument 3 of 'svmatch', but argument 2 had type 'svfloat16_t'} } */ |
| 26 |
svmatch (pg, f16, f16); /* { dg-error {'svmatch' has no form that takes 'svfloat16_t' arguments} } */ |
| 27 |
} |