| 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, |
| 10 |
svint32_t s32, svuint32_t u32, |
| 11 |
svint64_t s64, svuint64_t u64, |
| 12 |
svfloat32_t f32) |
| 13 |
{ |
| 14 |
svaddhnb (u16); /* { dg-error {too few arguments to function 'svaddhnb'} } */ |
| 15 |
svaddhnb (u16, u16, u16); /* { dg-error {too many arguments to function 'svaddhnb'} } */ |
| 16 |
svaddhnb (pg, pg); /* { dg-error {'svaddhnb' has no form that takes 'svbool_t' arguments} } */ |
| 17 |
svaddhnb (u8, u8); /* { dg-error {'svaddhnb' has no form that takes 'svuint8_t' arguments} } */ |
| 18 |
svaddhnb (s8, s8); /* { dg-error {'svaddhnb' has no form that takes 'svint8_t' arguments} } */ |
| 19 |
svaddhnb (u16, u16); |
| 20 |
svaddhnb (s16, s16); |
| 21 |
svaddhnb (u32, u32); |
| 22 |
svaddhnb (s32, s32); |
| 23 |
svaddhnb (u64, u64); |
| 24 |
svaddhnb (s64, s64); |
| 25 |
svaddhnb (f32, f32); /* { dg-error {'svaddhnb' has no form that takes 'svfloat32_t' arguments} } */ |
| 26 |
svaddhnb (1, u16); /* { dg-error {passing 'int' to argument 1 of 'svaddhnb', which expects an SVE type rather than a scalar} } */ |
| 27 |
svaddhnb (u16, s8); /* { dg-error {passing 'svint8_t' to argument 2 of 'svaddhnb', but argument 1 had type 'svuint16_t'} } */ |
| 28 |
svaddhnb (u16, s16); /* { dg-error {passing 'svint16_t' to argument 2 of 'svaddhnb', but argument 1 had type 'svuint16_t'} } */ |
| 29 |
svaddhnb (u16, u32); /* { dg-error {passing 'svuint32_t' to argument 2 of 'svaddhnb', but argument 1 had type 'svuint16_t'} } */ |
| 30 |
svaddhnb (u16, pg); /* { dg-error {passing 'svbool_t' to argument 2 of 'svaddhnb', but argument 1 had type 'svuint16_t'} } */ |
| 31 |
svaddhnb (u8, 0); /* { dg-error {'svaddhnb' has no form that takes 'svuint8_t' arguments} } */ |
| 32 |
svaddhnb (u16, 0); |
| 33 |
svaddhnb (u32, 0); |
| 34 |
svaddhnb (u64, 0); |
| 35 |
svaddhnb (pg, 0); /* { dg-error {'svaddhnb' has no form that takes 'svbool_t' arguments} } */ |
| 36 |
} |