| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-std=c99" } */ |
| 3 |
|
| 4 |
#include <arm_sve.h> |
| 5 |
|
| 6 |
#pragma GCC target ("+sve2p1") |
| 7 |
|
| 8 |
struct s { signed char x; }; |
| 9 |
|
| 10 |
svuint32_t |
| 11 |
f1 (svbool_t pg, short *s16_ptr, uint16_t *u16_ptr, |
| 12 |
int32_t *s32_ptr, float *f32_ptr, |
| 13 |
void *void_ptr, struct s *s_ptr, _Complex float *cf32_ptr, |
| 14 |
svint8_t s8, svuint8_t u8, svint16_t s16, svuint16_t u16, |
| 15 |
svint32_t s32, svuint32_t u32, svfloat32_t f32, |
| 16 |
svint64_t s64, svuint64_t u64, svfloat64_t f64, struct s s) |
| 17 |
{ |
| 18 |
svst1q_scatter_index (pg, s32_ptr, u64); /* { dg-error {too few arguments to function 'svst1q_scatter_index'} } */ |
| 19 |
svst1q_scatter_index (pg, s32_ptr, u64, s32, 0); /* { dg-error {too many arguments to function 'svst1q_scatter_index'} } */ |
| 20 |
svst1q_scatter_index (0, s32_ptr, u64, s32); /* { dg-error {passing 'int' to argument 1 of 'svst1q_scatter_index', which expects 'svbool_t'} } */ |
| 21 |
svst1q_scatter_index (pg, 0, u64, s32); |
| 22 |
svst1q_scatter_index (pg, (int32_t *) 0, u64, s32); |
| 23 |
svst1q_scatter_index (pg, void_ptr, u64, s32); |
| 24 |
svst1q_scatter_index (pg, s_ptr, u64, s32); /* { dg-error "passing argument 2 of 'svst1q_scatter_u64index_s32' from incompatible pointer type" } */ |
| 25 |
svst1q_scatter_index (pg, f32_ptr, u64, s32); /* { dg-error "passing argument 2 of 'svst1q_scatter_u64index_s32' from incompatible pointer type" } */ |
| 26 |
svst1q_scatter_index (pg, f32_ptr, u64, f32); |
| 27 |
svst1q_scatter_index (pg, cf32_ptr, u64, f32); /* { dg-error "passing argument 2 of 'svst1q_scatter_u64index_f32' from incompatible pointer type" } */ |
| 28 |
svst1q_scatter_index (pg, s, u64, s32); /* { dg-error {passing 'struct s' to argument 2 of 'svst1q_scatter_index', which expects a vector or pointer base address} } */ |
| 29 |
|
| 30 |
svst1q_scatter_index (pg, u64, void_ptr, s32); /* { dg-error "passing argument 3 of 'svst1q_scatter_u64base_index_s32' makes integer from pointer without a cast" } */ |
| 31 |
svst1q_scatter_index (pg, u64, pg, s32); /* { dg-error {passing 'svbool_t' to argument 3 of 'svst1q_scatter_index', which expects 'int64_t'} } */ |
| 32 |
svst1q_scatter_index (pg, u64, s64, s32); /* { dg-error {passing 'svint64_t' to argument 3 of 'svst1q_scatter_index', which expects 'int64_t'} } */ |
| 33 |
|
| 34 |
svst1q_scatter_index (pg, void_ptr, u64, pg); /* { dg-error {'svst1q_scatter_index' has no form that takes 'svbool_t' arguments} } */ |
| 35 |
svst1q_scatter_index (pg, u64, 0, s8); /* { dg-error {'svst1q_scatter_index' has no form that takes 'svint8_t' arguments} } */ |
| 36 |
svst1q_scatter_index (pg, void_ptr, s64, u8); /* { dg-error {'svst1q_scatter_index' has no form that takes 'svuint8_t' arguments} } */ |
| 37 |
|
| 38 |
svst1q_scatter_index (pg, s32, 0, s32); /* { dg-error {passing 'svint32_t' to argument 2 of 'svst1q_scatter_index', which expects 'svuint64_t'} } */ |
| 39 |
|
| 40 |
svst1q_scatter_index (pg, u32, 0, u16); /* { dg-error {passing 'svuint32_t' to argument 2 of 'svst1q_scatter_index', which expects 'svuint64_t'} } */ |
| 41 |
svst1q_scatter_index (pg, s32, 0, u32); /* { dg-error {passing 'svint32_t' to argument 2 of 'svst1q_scatter_index', which expects 'svuint64_t'} } */ |
| 42 |
|
| 43 |
svst1q_scatter_index (pg, u64, 0, s16); |
| 44 |
svst1q_scatter_index (pg, s64, 0, u16); /* { dg-error {passing 'svint64_t' to argument 2 of 'svst1q_scatter_index', which expects 'svuint64_t'} } */ |
| 45 |
|
| 46 |
svst1q_scatter_index (pg, u64, 0, u32); |
| 47 |
svst1q_scatter_index (pg, s64, 0, u64); /* { dg-error {passing 'svint64_t' to argument 2 of 'svst1q_scatter_index', which expects 'svuint64_t'} } */ |
| 48 |
|
| 49 |
svst1q_scatter_index (pg, u64, 0, f64); |
| 50 |
svst1q_scatter_index (pg, s64, 0, f64); /* { dg-error {passing 'svint64_t' to argument 2 of 'svst1q_scatter_index', which expects 'svuint64_t'} } */ |
| 51 |
|
| 52 |
svst1q_scatter_index (pg, s16_ptr, s8, s16); /* { dg-error {passing 'svint8_t' to argument 3 of 'svst1q_scatter_index', which expects a vector of 64-bit integers} } */ |
| 53 |
svst1q_scatter_index (pg, u16_ptr, s16, u16); /* { dg-error {passing 'svint16_t' to argument 3 of 'svst1q_scatter_index', which expects a vector of 64-bit integers} } */ |
| 54 |
svst1q_scatter_index (pg, s32_ptr, s32, s32); /* { dg-error {passing 'svint32_t' to argument 3 of 'svst1q_scatter_index', which expects a vector of 64-bit integers} } */ |
| 55 |
svst1q_scatter_index (pg, f32_ptr, f32, s32); /* { dg-error {passing 'svfloat32_t' to argument 3 of 'svst1q_scatter_index', which expects a vector of 64-bit integers} } */ |
| 56 |
svst1q_scatter_index (pg, s32_ptr, s64, s32); |
| 57 |
svst1q_scatter_index (pg, s32_ptr, u64, s32); |
| 58 |
svst1q_scatter_index (pg, s32_ptr, f64, s32); /* { dg-error {passing 'svfloat64_t' to argument 3 of 'svst1q_scatter_index', which expects a vector of 64-bit integers} } */ |
| 59 |
} |