| 1 |
/* { dg-do compile } */ |
| 2 |
|
| 3 |
#include <arm_sve.h> |
| 4 |
#include <stdbool.h> |
| 5 |
|
| 6 |
enum signed_enum { SA = -1, SB }; |
| 7 |
enum unsigned_enum { UA, UB }; |
| 8 |
|
| 9 |
void |
| 10 |
test (int8_t s8, int16_t s16, int32_t s32, int64_t s64, |
| 11 |
uint8_t u8, uint16_t u16, uint32_t u32, uint64_t u64, |
| 12 |
bool b, enum signed_enum se, enum unsigned_enum ue, |
| 13 |
int *ptr, float f32, svbool_t pg, svint32_t vec) |
| 14 |
{ |
| 15 |
svwhilele_b8 (s32); /* { dg-error {too few arguments to function 'svwhilele_b8'} } */ |
| 16 |
svwhilele_b8 (s32, s32, s32); /* { dg-error {too many arguments to function 'svwhilele_b8'} } */ |
| 17 |
|
| 18 |
svwhilele_b8 (b, b); |
| 19 |
svwhilele_b8 (se, se); |
| 20 |
svwhilele_b8 (ue, ue); |
| 21 |
svwhilele_b8 (s8, s8); |
| 22 |
svwhilele_b8 (u8, u8); |
| 23 |
svwhilele_b8 (s16, s16); |
| 24 |
svwhilele_b8 (u16, u16); |
| 25 |
svwhilele_b8 (ptr, ptr); /* { dg-error {passing 'int \*' to argument 1 of 'svwhilele_b8', which expects a 32-bit or 64-bit integer type} } */ |
| 26 |
svwhilele_b8 (f32, f32); /* { dg-error {passing 'float' to argument 1 of 'svwhilele_b8', which expects a 32-bit or 64-bit integer type} } */ |
| 27 |
svwhilele_b8 (pg, pg); /* { dg-error {passing 'svbool_t' to argument 1 of 'svwhilele_b8', which expects a 32-bit or 64-bit integer type} } */ |
| 28 |
svwhilele_b8 (vec, vec); /* { dg-error {passing 'svint32_t' to argument 1 of 'svwhilele_b8', which expects a 32-bit or 64-bit integer type} } */ |
| 29 |
|
| 30 |
svwhilele_b8 (s32, b); |
| 31 |
svwhilele_b8 (s32, se); |
| 32 |
svwhilele_b8 (s32, ue); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int32_t' but argument 2 has type 'uint32_t'} } */ |
| 33 |
svwhilele_b8 (s32, s8); |
| 34 |
svwhilele_b8 (s32, u8); |
| 35 |
svwhilele_b8 (s32, s16); |
| 36 |
svwhilele_b8 (s32, u16); |
| 37 |
|
| 38 |
svwhilele_b8 (u32, b); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'int32_t'} } */ |
| 39 |
svwhilele_b8 (u32, se); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'int32_t'} } */ |
| 40 |
svwhilele_b8 (u32, ue); |
| 41 |
svwhilele_b8 (u32, s8); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'int32_t'} } */ |
| 42 |
svwhilele_b8 (u32, u8); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'int32_t'} } */ |
| 43 |
svwhilele_b8 (u32, s16); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'int32_t'} } */ |
| 44 |
svwhilele_b8 (u32, u16); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'int32_t'} } */ |
| 45 |
|
| 46 |
svwhilele_b8 (s32, s32); |
| 47 |
svwhilele_b8 (s32, u32); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int32_t' but argument 2 has type 'uint32_t'} } */ |
| 48 |
svwhilele_b8 (s32, s64); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int32_t' but argument 2 has type 'int64_t'} } */ |
| 49 |
svwhilele_b8 (s32, u64); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int32_t' but argument 2 has type 'uint64_t'} } */ |
| 50 |
|
| 51 |
svwhilele_b8 (u32, s32); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'int32_t'} } */ |
| 52 |
svwhilele_b8 (u32, u32); |
| 53 |
svwhilele_b8 (u32, s64); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'int64_t'} } */ |
| 54 |
svwhilele_b8 (u32, u64); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'uint64_t'} } */ |
| 55 |
|
| 56 |
svwhilele_b8 (s64, s32); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int64_t' but argument 2 has type 'int32_t'} } */ |
| 57 |
svwhilele_b8 (s64, u32); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int64_t' but argument 2 has type 'uint32_t'} } */ |
| 58 |
svwhilele_b8 (s64, s64); |
| 59 |
svwhilele_b8 (s64, u64); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int64_t' but argument 2 has type 'uint64_t'} } */ |
| 60 |
|
| 61 |
svwhilele_b8 (u64, s32); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint64_t' but argument 2 has type 'int32_t'} } */ |
| 62 |
svwhilele_b8 (u64, u32); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint64_t' but argument 2 has type 'uint32_t'} } */ |
| 63 |
svwhilele_b8 (u64, s64); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint64_t' but argument 2 has type 'int64_t'} } */ |
| 64 |
svwhilele_b8 (u64, u64); |
| 65 |
|
| 66 |
svwhilele_b8 (0, s32); |
| 67 |
svwhilele_b8 (0, u32); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int32_t' but argument 2 has type 'uint32_t'} } */ |
| 68 |
svwhilele_b8 (0, s64); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int32_t' but argument 2 has type 'int64_t'} } */ |
| 69 |
svwhilele_b8 (0, u64); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int32_t' but argument 2 has type 'uint64_t'} } */ |
| 70 |
|
| 71 |
svwhilele_b8 (s32, 0); |
| 72 |
svwhilele_b8 (u32, 0); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'int32_t'} } */ |
| 73 |
svwhilele_b8 (s64, 0); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int64_t' but argument 2 has type 'int32_t'} } */ |
| 74 |
svwhilele_b8 (u64, 0); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint64_t' but argument 2 has type 'int32_t'} } */ |
| 75 |
|
| 76 |
svwhilele_b8 (0U, s32); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'int32_t'} } */ |
| 77 |
svwhilele_b8 (0U, u32); |
| 78 |
svwhilele_b8 (0U, s64); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'int64_t'} } */ |
| 79 |
svwhilele_b8 (0U, u64); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint32_t' but argument 2 has type 'uint64_t'} } */ |
| 80 |
|
| 81 |
svwhilele_b8 (s32, 0U); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int32_t' but argument 2 has type 'uint32_t'} } */ |
| 82 |
svwhilele_b8 (u32, 0U); |
| 83 |
svwhilele_b8 (s64, 0U); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'int64_t' but argument 2 has type 'uint32_t'} } */ |
| 84 |
svwhilele_b8 (u64, 0U); /* { dg-error {call to 'svwhilele_b8' is ambiguous; argument 1 has type 'uint64_t' but argument 2 has type 'uint32_t'} } */ |
| 85 |
} |