svint32_t init_sve_vc8 = { 0, 1, 2, 3, 4, 5 }; // { dg-error {too many initializers for 'svint32_t'} }
svint32_t init_sve_vc9 = { 0, bar (), 2, 3, 4, n }; // { dg-error {too many initializers for 'svint32_t'} }
+ svbool_t init_sve_vb1 = { 0, -1 };
+ svbool_t init_sve_vb2 = { 0, bar () }; // { dg-warning {narrowing conversion} "" { target c++11 } }
+ svbool_t init_sve_vb3 = { bar (), n }; // { dg-warning {narrowing conversion} "" { target c++11 } }
+ svbool_t init_sve_vb4 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ svbool_t init_sve_vb5 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, bar (), 0, 0 }; // { dg-warning {narrowing conversion} "" { target c++11 } }
+ svbool_t init_sve_vb6 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1 }; // { dg-error {too many initializers for 'svbool_t'} }
+ svbool_t init_sve_vb7 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, bar () }; // { dg-error {too many initializers for 'svbool_t'} }
+ svbool_t init_sve_vb8 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, bar (), -1 }; // { dg-error {too many initializers for 'svbool_t'} }
+ svbool_t init_sve_vb9 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, bar (), n }; // { dg-error {too many initializers for 'svbool_t'} }
+
// Constructor calls.
(0, svint8_t ());
svint32_t init_sve_vc8 = { 0, bar (), 2, 3, 4, n, 5, 6, 7, 8, 9 }; // { dg-error {too many initializers for 'svint32_t'} }
svint32_t init_sve_vc9 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; // { dg-error {too many initializers for 'svint32_t'} }
+ svbool_t init_sve_vb1 = { 0, -1 };
+ svbool_t init_sve_vb2 = { 0, bar () }; // { dg-warning {narrowing conversion} "" { target c++11 } }
+ svbool_t init_sve_vb3 = { bar (), n }; // { dg-warning {narrowing conversion} "" { target c++11 } }
+ svbool_t init_sve_vb4 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ svbool_t init_sve_vb5 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, bar (), 0, 0, 0, 0, 0, 0, // { dg-warning {narrowing conversion} "" { target c++11 } }
+ 0, 0 };
+ svbool_t init_sve_vb6 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0 }; // { dg-error {too many initializers for 'svbool_t'} }
+ svbool_t init_sve_vb7 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ bar () }; // { dg-error {too many initializers for 'svbool_t'} }
+ svbool_t init_sve_vb8 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ bar (), -1 }; // { dg-error {too many initializers for 'svbool_t'} }
+ svbool_t init_sve_vb9 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ bar (), n }; // { dg-error {too many initializers for 'svbool_t'} }
+
// Constructor calls.
(0, svint8_t ());
typedef uint8_t gnu_uint8_t __attribute__ ((vector_size (32)));
typedef int8_t gnu_int8_t __attribute__ ((vector_size (32)));
+typedef int32_t gnu128_int32_t __attribute__ ((vector_size (128)));
+typedef int32_t gnu32_int32_t __attribute__ ((vector_size (32)));
+
void
-f (svuint8_t sve_u1, svint8_t sve_s1,
- gnu_uint8_t gnu_u1, gnu_int8_t gnu_s1, int n, unsigned char uc)
+f (svuint8_t sve_u1, svint8_t sve_s1, svbool_t sve_b1, svbool_t sve_b2,
+ gnu_uint8_t gnu_u1, gnu_int8_t gnu_s1, gnu128_int32_t gnu128_s1,
+ int n, unsigned char uc)
{
// Initialization
gnu_uint8_t init_gnu_u20 (sve_s1); // { dg-error {cannot convert 'svint8_t' to 'gnu_uint8_t'[^\n]* in initialization} }
gnu_uint8_t init_gnu_u21 (gnu_s1); // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'gnu_uint8_t'[^\n]* in initialization} }
+ // Boolean inits.
+ svbool_t init_sve_b1 = 0; // { dg-error {cannot convert 'int' to 'svbool_t'} }
+ svbool_t init_sve_b2 = {};
+ svbool_t init_sve_b3 = { sve_b1 };
+ svbool_t init_sve_b4 = { gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'signed char:1'} }
+ svbool_t init_sve_b5 = { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'signed char:1'} }
+ svbool_t init_sve_b6 = { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'signed char:1'} }
+ svbool_t init_sve_b7 = { 0 };
+
+ svbool_t init_sve_b8 = { sve_u1, sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'signed char:1'} }
+ svbool_t init_sve_b9 = { gnu_u1, gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'signed char:1'} }
+ init_gnu_u8 = { sve_b1 }; // { dg-error {cannot convert '<brace-enclosed initializer list>' to 'gnu_uint8_t'[^\n]*} }
+ init_gnu_u8 = { sve_b1, sve_b1 }; // { dg-error {cannot convert '<brace-enclosed initializer list>' to 'gnu_uint8_t'[^\n]*} }
+
// Compound literals
(svuint8_t) {};
(gnu_uint8_t) { sve_u1, sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'unsigned char' in initialization} }
(gnu_uint8_t) { gnu_u1, gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} }
+ // Boolean compound literals.
+
+ (svbool_t) {};
+ (svbool_t) { 0 };
+ (svbool_t) { sve_b1 };
+ (svbool_t) { gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'signed char:1'} }
+ (svbool_t) { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'signed char:1'} }
+ (svbool_t) { sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'signed char:1'} }
+ (svbool_t) { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'signed char:1'} }
+ (gnu_uint8_t) { sve_b1 }; // { dg-error {cannot convert 'svbool_t' to 'unsigned char'} }
+
// Assignment
sve_u1 = 0; // { dg-error {cannot convert 'int' to 'svuint8_t' in assignment} }
gnu_u1 = sve_s1; // { dg-error {cannot convert 'svint8_t' to 'gnu_uint8_t'[^\n]* in assignment} }
gnu_u1 = gnu_s1; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'gnu_uint8_t'[^\n]* in assignment} }
+ // Boolean Assignments.
+
+ sve_b1 = 0; // { dg-error {cannot convert 'int' to 'svbool_t'} }
+ sve_b1 = sve_b1;
+ sve_b1 = sve_s1; // { dg-error {cannot convert 'svint8_t' to 'svbool_t'} }
+ sve_b1 = gnu_s1; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'svbool_t'} }
+ gnu_u1 = sve_b1; // { dg-error {cannot convert 'svbool_t' to 'gnu_uint8_t'} }
+
// Casts
(void) sve_u1;
(gnu_uint8_t) sve_s1;
(gnu_uint8_t) gnu_s1;
+ // Boolean casts.
+ (void) sve_b1;
+ (svbool_t) sve_b1;
+ (svbool_t) gnu_u1; // { dg-error {cannot convert a value of type 'gnu_uint8_t'[^\n]* to vector type 'svbool_t' which has different size} }
+ (svbool_t) sve_u1; // { dg-error {cannot convert a value of type 'svuint8_t' to vector type 'svbool_t' which has different size} }
+ (svbool_t) 0;
+ (svbool_t) n;
+ (svint8_t) sve_b1; // { dg-error {cannot convert a value of type 'svbool_t' to vector type 'svint8_t' which has different size} }
+ (gnu_uint8_t) sve_b1; // { dg-error {cannot convert a value of type 'svbool_t' to vector type 'gnu_uint8_t'[^\n]* which has different size} }
+ (gnu_int8_t) sve_b1; // { dg-error {cannot convert a value of type 'svbool_t' to vector type 'gnu_int8_t'[^\n]* which has different size} }
+
// Vector indexing.
sve_u1[0];
gnu_u1++;
gnu_u1--;
+ // Boolean unary ops.
+
+ +sve_b1;
+ -sve_b1; // { dg-error {negation operation not permitted} }
+ ~sve_b1;
+ !sve_b1;
+ *sve_b1; // { dg-error {invalid type argument of unary '\*'} }
+ __real sve_b1; // { dg-error {wrong type argument to __real} }
+ __imag sve_b1; // { dg-error {wrong type argument to __imag} }
+ ++sve_b1; // { dg-error {not permitted} }
+ --sve_b1; // { dg-error {not permitted} }
+ sve_b1++; // { dg-error {not permitted} }
+ sve_b1--; // { dg-error {not permitted} }
+
// Vector-vector binary arithmetic.
sve_u1 + sve_u1;
sve_u1 && sve_u1;
sve_u1 || sve_u1;
+ // Boolean vector-vector binary arithmetic.
+
+ sve_b1 + sve_b1; // { dg-error {not permitted} }
+ sve_b1 - sve_b1; // { dg-error {not permitted} }
+ sve_b1 * sve_b1; // { dg-error {not permitted} }
+ sve_b1 / sve_b1; // { dg-error {not permitted} }
+ sve_b1 % sve_b1; // { dg-error {invalid operands} }
+ sve_b1 & sve_b1;
+ sve_b1 | sve_b1;
+ sve_b1 ^ sve_b1;
+ sve_b1 == sve_b1;
+ sve_b1 != sve_b1;
+ sve_b1 <= sve_b1; // { dg-error {only == and != operations permitted} }
+ sve_b1 < sve_b1; // { dg-error {only == and != operations permitted} }
+ sve_b1 > sve_b1; // { dg-error {only == and != operations permitted} }
+ sve_b1 >= sve_b1; // { dg-error {only == and != operations permitted} }
+ sve_b1 << sve_b1; // { dg-error {not permitted} }
+ sve_b1 >> sve_b1; // { dg-error {not permitted} }
+ sve_b1 && sve_b1;
+ sve_b1 || sve_b1;
+
sve_u1 + gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} }
sve_u1 - gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} }
sve_u1 * gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} }
gnu_u1 ? gnu_u1 : uc;
gnu_u1 ? uc : gnu_u1;
+ // Boolean conditional expressions.
+
+ uc ? sve_b1 : sve_b2;
+ sve_b1 ? sve_b1 : sve_b2;
+
+ sve_b1 ? sve_u1 : sve_u1; // { dg-error {incompatible vector types in conditional expression} }
+ sve_b1 ? sve_s1 : sve_s1; // { dg-error {incompatible vector types in conditional expression} }
+ sve_b1 ? gnu_u1 : sve_u1; // { dg-error {incompatible vector types in conditional expression} }
+ sve_b1 ? sve_u1 : gnu_u1; // { dg-error {incompatible vector types in conditional expression} }
+ sve_b1 ? gnu_u1 : gnu_u1; // { dg-error {incompatible vector types in conditional expression} }
+ sve_b1 ? gnu_s1 : gnu_s1; // { dg-error {incompatible vector types in conditional expression} }
+
+ sve_u1 ? sve_b1 : sve_b2; // { dg-error {incompatible vector types in conditional expression} }
+ sve_s1 ? sve_b1 : sve_b2; // { dg-error {incompatible vector types in conditional expression} }
+ gnu_u1 ? sve_b1 : sve_b2; // { dg-error {incompatible vector types in conditional expression} }
+ gnu_s1 ? sve_b1 : sve_b2; // { dg-error {incompatible vector types in conditional expression} }
+ gnu_u1 ? gnu_u1 : sve_b1; // { dg-error {incompatible vector types in conditional expression} }
+ gnu_u1 ? sve_b1 : gnu_u1; // { dg-error {incompatible vector types in conditional expression} }
+
// Vector built-ins.
__builtin_shuffle (sve_u1, sve_u1, sve_u1);
__builtin_convertvector (sve_u1, gnu_uint8_t);
__builtin_convertvector (gnu_u1, gnu_uint8_t);
+ // Boolean vector built-ins.
+
+ __builtin_shuffle (sve_b1, sve_b1, sve_s1);
+ __builtin_shuffle (sve_b1, sve_b1, sve_u1);
+ __builtin_shuffle (sve_b1, sve_b1, gnu_s1);
+ __builtin_shuffle (sve_b1, sve_b1, gnu_u1);
+
+ __builtin_shuffle (sve_b1, gnu_u1, gnu_u1); // { dg-error {'__builtin_shuffle' argument vectors must be of the same type} }
+ __builtin_shuffle (gnu_u1, sve_b1, gnu_u1); // { dg-error {'__builtin_shuffle' argument vectors must be of the same type} }
+
+ __builtin_convertvector (sve_b1, svint8_t);
+ __builtin_convertvector (sve_b1, svuint8_t);
+ __builtin_convertvector (sve_b1, gnu_int8_t);
+ __builtin_convertvector (sve_b1, gnu_uint8_t);
+
+ __builtin_convertvector (sve_s1, svbool_t);
+ __builtin_convertvector (gnu_s1, svbool_t);
+ __builtin_convertvector (sve_u1, svbool_t);
+ __builtin_convertvector (gnu_u1, svbool_t);
+
+ __builtin_convertvector (sve_b1, svint32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+ __builtin_convertvector (sve_b1, svuint32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+ __builtin_convertvector (sve_b1, gnu32_int32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+
+ __builtin_convertvector (sve_b1, gnu128_int32_t);
+ __builtin_convertvector (gnu128_s1, svbool_t);
+
// Type queries.
static_assert(__is_literal_type(svuint8_t));
typedef uint8_t gnu_uint8_t __attribute__ ((vector_size (32)));
typedef int8_t gnu_int8_t __attribute__ ((vector_size (32)));
+typedef int32_t gnu128_int32_t __attribute__ ((vector_size (128)));
+typedef int32_t gnu32_int32_t __attribute__ ((vector_size (32)));
+
void
-f (svuint8_t sve_u1, svint8_t sve_s1,
- gnu_uint8_t gnu_u1, gnu_int8_t gnu_s1, int n, unsigned char uc)
+f (svuint8_t sve_u1, svint8_t sve_s1, svbool_t sve_b1, svbool_t sve_b2,
+ gnu_uint8_t gnu_u1, gnu_int8_t gnu_s1, gnu128_int32_t gnu128_s1,
+ int n, unsigned char uc)
{
// Initialization
gnu_uint8_t init_gnu_u20 (sve_s1);
gnu_uint8_t init_gnu_u21 (gnu_s1);
+ // Boolean inits.
+ svbool_t init_sve_b1 = 0; // { dg-error {cannot convert 'int' to 'svbool_t'} }
+ svbool_t init_sve_b2 = {};
+ svbool_t init_sve_b3 = { sve_b1 };
+ svbool_t init_sve_b4 = { gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'signed char:1'} }
+ svbool_t init_sve_b5 = { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'signed char:1'} }
+ svbool_t init_sve_b6 = { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'signed char:1'} }
+ svbool_t init_sve_b7 = { 0 };
+
+ svbool_t init_sve_b8 = { sve_u1, sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'signed char:1'} }
+ svbool_t init_sve_b9 = { gnu_u1, gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'signed char:1'} }
+ init_gnu_u8 = { sve_b1 }; // { dg-error {cannot convert '<brace-enclosed initializer list>' to 'gnu_uint8_t'[^\n]*} }
+ init_gnu_u8 = { sve_b1, sve_b1 }; // { dg-error {cannot convert '<brace-enclosed initializer list>' to 'gnu_uint8_t'[^\n]*} }
+
// Compound literals
(svuint8_t) {};
(gnu_uint8_t) { sve_u1, sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'unsigned char' in initialization} }
(gnu_uint8_t) { gnu_u1, gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'unsigned char' in initialization} }
+ // Boolean compound literals.
+
+ (svbool_t) {};
+ (svbool_t) { 0 };
+ (svbool_t) { sve_b1 };
+ (svbool_t) { gnu_u1 }; // { dg-error {cannot convert 'gnu_uint8_t'[^\n]* to 'signed char:1'} }
+ (svbool_t) { sve_s1 }; // { dg-error {cannot convert 'svint8_t' to 'signed char:1'} }
+ (svbool_t) { sve_u1 }; // { dg-error {cannot convert 'svuint8_t' to 'signed char:1'} }
+ (svbool_t) { gnu_s1 }; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'signed char:1'} }
+ (gnu_uint8_t) { sve_b1 }; // { dg-error {cannot convert 'svbool_t' to 'unsigned char'} }
+
// Assignment
sve_u1 = 0; // { dg-error {cannot convert 'int' to 'svuint8_t' in assignment} }
gnu_u1 = sve_s1;
gnu_u1 = gnu_s1;
+ // Boolean Assignments.
+
+ sve_b1 = 0; // { dg-error {cannot convert 'int' to 'svbool_t'} }
+ sve_b1 = sve_b1;
+ sve_b1 = sve_s1; // { dg-error {cannot convert 'svint8_t' to 'svbool_t'} }
+ sve_b1 = gnu_s1; // { dg-error {cannot convert 'gnu_int8_t'[^\n]* to 'svbool_t'} }
+ gnu_u1 = sve_b1; // { dg-error {cannot convert 'svbool_t' to 'gnu_uint8_t'} }
+
// Casts
(void) sve_u1;
(gnu_uint8_t) sve_s1;
(gnu_uint8_t) gnu_s1;
+ // Boolean casts.
+ (void) sve_b1;
+ (svbool_t) sve_b1;
+ (svbool_t) gnu_u1; // { dg-error {cannot convert a value of type 'gnu_uint8_t'[^\n]* to vector type 'svbool_t' which has different size} }
+ (svbool_t) sve_u1; // { dg-error {cannot convert a value of type 'svuint8_t' to vector type 'svbool_t' which has different size} }
+ (svbool_t) 0;
+ (svbool_t) n;
+ (svint8_t) sve_b1; // { dg-error {cannot convert a value of type 'svbool_t' to vector type 'svint8_t' which has different size} }
+ (gnu_uint8_t) sve_b1; // { dg-error {cannot convert a value of type 'svbool_t' to vector type 'gnu_uint8_t'[^\n]* which has different size} }
+ (gnu_int8_t) sve_b1; // { dg-error {cannot convert a value of type 'svbool_t' to vector type 'gnu_int8_t'[^\n]* which has different size} }
+
// Vector indexing.
sve_u1[0];
gnu_u1++;
gnu_u1--;
+ // Boolean unary ops.
+
+ +sve_b1;
+ -sve_b1; // { dg-error {negation operation not permitted} }
+ ~sve_b1;
+ !sve_b1;
+ *sve_b1; // { dg-error {invalid type argument of unary '\*'} }
+ __real sve_b1; // { dg-error {wrong type argument to __real} }
+ __imag sve_b1; // { dg-error {wrong type argument to __imag} }
+ ++sve_b1; // { dg-error {not permitted} }
+ --sve_b1; // { dg-error {not permitted} }
+ sve_b1++; // { dg-error {not permitted} }
+ sve_b1--; // { dg-error {not permitted} }
+
// Vector-vector binary arithmetic.
sve_u1 + sve_u1;
sve_u1 && sve_u1;
sve_u1 || sve_u1;
+ // Boolean vector-vector binary arithmetic.
+
+ sve_b1 + sve_b1; // { dg-error {not permitted} }
+ sve_b1 - sve_b1; // { dg-error {not permitted} }
+ sve_b1 * sve_b1; // { dg-error {not permitted} }
+ sve_b1 / sve_b1; // { dg-error {not permitted} }
+ sve_b1 % sve_b1; // { dg-error {invalid operands} }
+ sve_b1 & sve_b1;
+ sve_b1 | sve_b1;
+ sve_b1 ^ sve_b1;
+ sve_b1 == sve_b1;
+ sve_b1 != sve_b1;
+ sve_b1 <= sve_b1; // { dg-error {only == and != operations permitted} }
+ sve_b1 < sve_b1; // { dg-error {only == and != operations permitted} }
+ sve_b1 > sve_b1; // { dg-error {only == and != operations permitted} }
+ sve_b1 >= sve_b1; // { dg-error {only == and != operations permitted} }
+ sve_b1 << sve_b1; // { dg-error {not permitted} }
+ sve_b1 >> sve_b1; // { dg-error {not permitted} }
+ sve_b1 && sve_b1;
+ sve_b1 || sve_b1;
+
sve_u1 + gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} }
sve_u1 - gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} }
sve_u1 * gnu_u1; // { dg-error {cannot combine GNU and SVE vectors in a binary operation} }
gnu_u1 ? gnu_u1 : uc;
gnu_u1 ? uc : gnu_u1;
+ // Boolean conditional expressions.
+
+ uc ? sve_b1 : sve_b2;
+ sve_b1 ? sve_b1 : sve_b2;
+
+ sve_b1 ? sve_u1 : sve_u1; // { dg-error {incompatible vector types in conditional expression} }
+ sve_b1 ? sve_s1 : sve_s1; // { dg-error {incompatible vector types in conditional expression} }
+ sve_b1 ? gnu_u1 : sve_u1; // { dg-error {incompatible vector types in conditional expression} }
+ sve_b1 ? sve_u1 : gnu_u1; // { dg-error {incompatible vector types in conditional expression} }
+ sve_b1 ? gnu_u1 : gnu_u1; // { dg-error {incompatible vector types in conditional expression} }
+ sve_b1 ? gnu_s1 : gnu_s1; // { dg-error {incompatible vector types in conditional expression} }
+
+ sve_u1 ? sve_b1 : sve_b2; // { dg-error {incompatible vector types in conditional expression} }
+ sve_s1 ? sve_b1 : sve_b2; // { dg-error {incompatible vector types in conditional expression} }
+ gnu_u1 ? sve_b1 : sve_b2; // { dg-error {incompatible vector types in conditional expression} }
+ gnu_s1 ? sve_b1 : sve_b2; // { dg-error {incompatible vector types in conditional expression} }
+ gnu_u1 ? gnu_u1 : sve_b1; // { dg-error {incompatible vector types in conditional expression} }
+ gnu_u1 ? sve_b1 : gnu_u1; // { dg-error {incompatible vector types in conditional expression} }
+
// Vector built-ins.
__builtin_shuffle (sve_u1, sve_u1, sve_u1);
__builtin_convertvector (sve_u1, gnu_uint8_t);
__builtin_convertvector (gnu_u1, gnu_uint8_t);
+ // Boolean vector built-ins.
+
+ __builtin_shuffle (sve_b1, sve_b1, sve_s1);
+ __builtin_shuffle (sve_b1, sve_b1, sve_u1);
+ __builtin_shuffle (sve_b1, sve_b1, gnu_s1);
+ __builtin_shuffle (sve_b1, sve_b1, gnu_u1);
+
+ __builtin_shuffle (sve_b1, gnu_u1, gnu_u1); // { dg-error {'__builtin_shuffle' argument vectors must be of the same type} }
+ __builtin_shuffle (gnu_u1, sve_b1, gnu_u1); // { dg-error {'__builtin_shuffle' argument vectors must be of the same type} }
+
+ __builtin_convertvector (sve_b1, svint8_t);
+ __builtin_convertvector (sve_b1, svuint8_t);
+ __builtin_convertvector (sve_b1, gnu_int8_t);
+ __builtin_convertvector (sve_b1, gnu_uint8_t);
+
+ __builtin_convertvector (sve_s1, svbool_t);
+ __builtin_convertvector (gnu_s1, svbool_t);
+ __builtin_convertvector (sve_u1, svbool_t);
+ __builtin_convertvector (gnu_u1, svbool_t);
+
+ __builtin_convertvector (sve_b1, svint32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+ __builtin_convertvector (sve_b1, svuint32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+ __builtin_convertvector (sve_b1, gnu32_int32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+
+ __builtin_convertvector (sve_b1, gnu128_int32_t);
+ __builtin_convertvector (gnu128_s1, svbool_t);
+
// Type queries.
static_assert(__is_literal_type(svuint8_t));
typedef uint8_t gnu_uint8_t __attribute__ ((vector_size (32)));
typedef int8_t gnu_int8_t __attribute__ ((vector_size (32)));
+typedef int32_t gnu128_int32_t __attribute__ ((vector_size (128)));
+typedef int32_t gnu32_int32_t __attribute__ ((vector_size (32)));
+
void
-f (svuint8_t sve_u1, svint8_t sve_s1,
- gnu_uint8_t gnu_u1, gnu_int8_t gnu_s1, int n, unsigned char uc)
+f (svuint8_t sve_u1, svint8_t sve_s1, svbool_t sve_b1, svbool_t sve_b2,
+ gnu_uint8_t gnu_u1, gnu_int8_t gnu_s1, gnu128_int32_t gnu128_s1, int n, unsigned char uc)
{
/* Initialization. */
svuint8_t init_sve_u6 = { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
svuint8_t init_sve_u7 = { 0 };
+ /* Boolean inits. */
+ svbool_t init_sve_b1 = 0; /* { dg-error {incompatible types when initializing type 'svbool_t' using type 'int'} } */
+ svbool_t init_sve_b2 = {};
+ svbool_t init_sve_b3 = { sve_b1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ svbool_t init_sve_b4 = { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ svbool_t init_sve_b5 = { sve_s1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ svbool_t init_sve_b6 = { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ svbool_t init_sve_b7 = { 0 };
+
svuint8_t init_sve_u8 = { sve_u1, sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
svuint8_t init_sve_u9 = { gnu_u1, gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
gnu_uint8_t init_gnu_u6 = { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
gnu_uint8_t init_gnu_u7 = { 0 };
+ /* Boolean inits. */
+ svbool_t init_sve_b8 = { sve_u1, sve_u1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ svbool_t init_sve_b9 = { gnu_u1, gnu_u1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ gnu_uint8_t init_gnu_u8 = { sve_b1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
+
/* Compound literals. */
(svuint8_t) {};
(gnu_uint8_t) { sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
(gnu_uint8_t) { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
+ /* Boolean compound literals. */
+ (svbool_t) {};
+ (svbool_t) { 0 };
+ (svbool_t) { sve_b1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ (svbool_t) { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ (svbool_t) { sve_s1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ (svbool_t) { sve_u1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ (svbool_t) { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ (gnu_uint8_t) { sve_b1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
+
/* Assignment. */
sve_u1 = 0; /* { dg-error {incompatible types when assigning to type 'svuint8_t' from type 'int'} } */
gnu_u1 = sve_s1; /* { dg-error {incompatible types when assigning to type 'gnu_uint8_t'[^\n]* from type 'svint8_t'} } */
gnu_u1 = gnu_s1; /* { dg-error {incompatible types when assigning to type 'gnu_uint8_t'[^\n]* from type 'gnu_int8_t'} } */
+ /* Boolean Assignments. */
+
+ sve_b1 = 0; /* { dg-error {incompatible types when assigning to type 'svbool_t' from type 'int'} } */
+ sve_b1 = sve_b1;
+ sve_b1 = sve_s1; /* { dg-error {incompatible types when assigning to type 'svbool_t' from type 'svint8_t'} } */
+ sve_b1 = gnu_s1; /* { dg-error {incompatible types when assigning to type 'svbool_t' from type 'gnu_int8_t'} } */
+ gnu_u1 = sve_b1; /* { dg-error {incompatible types when assigning to type 'gnu_uint8_t'[^\n]* from type 'svbool_t'} } */
+
/* Casts. */
(void) sve_u1;
(gnu_int8_t) sve_u1;
(gnu_int8_t) gnu_u1;
+ /* Boolean casts. */
+ (void) sve_b1;
+ (svbool_t) sve_b1;
+ (svbool_t) gnu_u1; /* { dg-error {cannot convert a value of type 'gnu_uint8_t'} } */
+ (svbool_t) sve_u1; /* { dg-error {cannot convert a value of type 'svuint8_t'} } */
+ (svbool_t) 0; /* This is OK. sizeof (svbool_t) == sizeof (int) for VL == 256. */
+ (svbool_t) n; /* This is OK. sizeof (svbool_t) == sizeof (int) for VL == 256. */
+ (svbool_t) (short)0; /* { dg-error {cannot convert a value of type 'short int'} } */
+ (svbool_t) (short)n; /* { dg-error {cannot convert a value of type 'short int'} } */
+ (svint8_t) sve_b1; /* { dg-error {cannot convert a value of type 'svbool_t'} } */
+ (gnu_uint8_t) sve_b1; /* { dg-error {cannot convert a value of type 'svbool_t'} } */
+ (gnu_int8_t) sve_b1; /* { dg-error {cannot convert a value of type 'svbool_t'} } */
+
/* Vector indexing. */
sve_u1[0];
gnu_u1++;
gnu_u1--;
+ /* Boolean unary ops. */
+
+ +sve_b1;
+ -sve_b1; /* { dg-error {negation operation not permitted} } */
+ ~sve_b1;
+ !sve_b1; /* { dg-error {wrong type argument to unary exclamation mark} } */
+ *sve_b1; /* { dg-error {invalid type argument of unary '\*'} } */
+ __real sve_b1; /* { dg-error {wrong type argument to __real} } */
+ __imag sve_b1; /* { dg-error {wrong type argument to __imag} } */
+ ++sve_b1; /* { dg-error {not permitted} } */
+ --sve_b1; /* { dg-error {not permitted} } */
+ sve_b1++; /* { dg-error {not permitted} } */
+ sve_b1--; /* { dg-error {not permitted} } */
+
/* Vector-vector binary arithmetic. */
sve_u1 + sve_u1;
sve_u1 && sve_u1; /* { dg-error {used vector type where scalar is required} } */
sve_u1 || sve_u1; /* { dg-error {used vector type where scalar is required} } */
+ /* Boolean vector-vector binary arithmetic. */
+
+ sve_b1 + sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 - sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 * sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 / sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 % sve_b1; /* { dg-error {invalid operands to binary} } */
+ sve_b1 & sve_b1;
+ sve_b1 | sve_b1;
+ sve_b1 ^ sve_b1;
+ sve_b1 == sve_b1;
+ sve_b1 != sve_b1;
+ sve_b1 <= sve_b1; /* { dg-error {only == and != operations permitted} } */
+ sve_b1 < sve_b1; /* { dg-error {only == and != operations permitted} } */
+ sve_b1 > sve_b1; /* { dg-error {only == and != operations permitted} } */
+ sve_b1 >= sve_b1; /* { dg-error {only == and != operations permitted} } */
+ sve_b1 << sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 >> sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 && sve_b1; /* { dg-error {used vector type where scalar is required} } */
+ sve_b1 || sve_b1; /* { dg-error {used vector type where scalar is required} } */
+
sve_u1 + gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */
sve_u1 - gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */
sve_u1 * gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */
gnu_u1 ? sve_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */
gnu_u1 ? gnu_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */
+ /* Boolean conditional expressions. */
+
+ uc ? sve_b1 : sve_b2;
+
+ sve_b1 ? sve_u1 : sve_u1; /* { dg-error {used vector type where scalar is required} } */
+ sve_b1 ? gnu_u1 : sve_u1; /* { dg-error {used vector type where scalar is required} } */
+ sve_b1 ? sve_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */
+ sve_b1 ? gnu_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */
+
+ sve_u1 ? sve_b1 : sve_b2; /* { dg-error {used vector type where scalar is required} } */
+ gnu_u1 ? sve_b1 : sve_b2; /* { dg-error {used vector type where scalar is required} } */
+ gnu_u1 ? gnu_u1 : sve_b1; /* { dg-error {used vector type where scalar is required} } */
+ gnu_u1 ? sve_b1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */
+
/* Vector built-ins. */
__builtin_shuffle (sve_u1, sve_u1, sve_u1);
__builtin_convertvector (gnu_u1, svuint8_t);
__builtin_convertvector (sve_u1, gnu_uint8_t);
__builtin_convertvector (gnu_u1, gnu_uint8_t);
+
+ /* Boolean vector built-ins. */
+
+ __builtin_shuffle (sve_b1, sve_b1, sve_s1);
+ __builtin_shuffle (sve_b1, sve_b1, sve_u1);
+ __builtin_shuffle (sve_b1, sve_b1, gnu_s1);
+ __builtin_shuffle (sve_b1, sve_b1, gnu_u1);
+
+ __builtin_shuffle (sve_b1, gnu_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } */
+ __builtin_shuffle (gnu_u1, sve_b1, gnu_u1); /* { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } */
+
+ __builtin_convertvector (sve_b1, svint8_t);
+ __builtin_convertvector (sve_b1, svuint8_t);
+ __builtin_convertvector (sve_b1, gnu_int8_t);
+ __builtin_convertvector (sve_b1, gnu_uint8_t);
+
+ __builtin_convertvector (sve_s1, svbool_t);
+ __builtin_convertvector (gnu_s1, svbool_t);
+ __builtin_convertvector (sve_u1, svbool_t);
+ __builtin_convertvector (gnu_u1, svbool_t);
+
+ __builtin_convertvector (sve_b1, svint32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+ __builtin_convertvector (sve_b1, svuint32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+ __builtin_convertvector (sve_b1, gnu32_int32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+
+ __builtin_convertvector (sve_b1, gnu128_int32_t);
+ __builtin_convertvector (gnu128_s1, svbool_t);
}
typedef uint8_t gnu_uint8_t __attribute__ ((vector_size (32)));
typedef int8_t gnu_int8_t __attribute__ ((vector_size (32)));
+typedef int32_t gnu128_int32_t __attribute__ ((vector_size (128)));
+typedef int32_t gnu32_int32_t __attribute__ ((vector_size (32)));
+
void
-f (svuint8_t sve_u1, svint8_t sve_s1,
- gnu_uint8_t gnu_u1, gnu_int8_t gnu_s1, int n, unsigned char uc)
+f (svuint8_t sve_u1, svint8_t sve_s1, svbool_t sve_b1, svbool_t sve_b2,
+ gnu_uint8_t gnu_u1, gnu_int8_t gnu_s1, gnu128_int32_t gnu128_s1, int n, unsigned char uc)
{
/* Initialization. */
svuint8_t init_sve_u8 = { sve_u1, sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
svuint8_t init_sve_u9 = { gnu_u1, gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
+ /* Boolean inits. */
+ svbool_t init_sve_b1 = 0; /* { dg-error {incompatible types when initializing type 'svbool_t' using type 'int'} } */
+ svbool_t init_sve_b2 = {};
+ svbool_t init_sve_b3 = { sve_b1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ svbool_t init_sve_b4 = { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ svbool_t init_sve_b5 = { sve_s1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ svbool_t init_sve_b6 = { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ svbool_t init_sve_b7 = { 0 };
+
gnu_uint8_t init_gnu_u1 = 0; /* { dg-error {incompatible types when initializing type 'gnu_uint8_t'[^\n]* using type 'int'} } */
gnu_uint8_t init_gnu_u2 = {};
gnu_uint8_t init_gnu_u3 = { sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
gnu_uint8_t init_gnu_u6 = { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
gnu_uint8_t init_gnu_u7 = { 0 };
+ /* Boolean inits. */
+ svbool_t init_sve_b8 = { sve_u1, sve_u1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ svbool_t init_sve_b9 = { gnu_u1, gnu_u1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ gnu_uint8_t init_gnu_u8 = { sve_b1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
+
/* Compound literals. */
(svuint8_t) {};
(gnu_uint8_t) { sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
(gnu_uint8_t) { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
+ /* Boolean compound literals. */
+ (svbool_t) {};
+ (svbool_t) { 0 };
+ (svbool_t) { sve_b1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ (svbool_t) { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ (svbool_t) { sve_s1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ (svbool_t) { sve_u1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ (svbool_t) { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'signed char:1'} } */
+ (gnu_uint8_t) { sve_b1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */
+
/* Assignment. */
sve_u1 = 0; /* { dg-error {incompatible types when assigning to type 'svuint8_t' from type 'int'} } */
gnu_u1 = sve_s1;
gnu_u1 = gnu_s1;
+ /* Boolean Assignments. */
+
+ sve_b1 = 0; /* { dg-error {incompatible types when assigning to type 'svbool_t' from type 'int'} } */
+ sve_b1 = sve_b1;
+ sve_b1 = sve_s1; /* { dg-error {incompatible types when assigning to type 'svbool_t' from type 'svint8_t'} } */
+ sve_b1 = gnu_s1; /* { dg-error {incompatible types when assigning to type 'svbool_t' from type 'gnu_int8_t'} } */
+ gnu_u1 = sve_b1; /* { dg-error {incompatible types when assigning to type 'gnu_uint8_t'[^\n]* from type 'svbool_t'} } */
+
/* Casts. */
(void) sve_u1;
(gnu_int8_t) sve_u1;
(gnu_int8_t) gnu_u1;
+ /* Boolean casts. */
+ (void) sve_b1;
+ (svbool_t) sve_b1;
+ (svbool_t) gnu_u1; /* { dg-error {cannot convert a value of type 'gnu_uint8_t'} } */
+ (svbool_t) sve_u1; /* { dg-error {cannot convert a value of type 'svuint8_t'} } */
+ (svbool_t) 0; /* This is OK. sizeof (svbool_t) == sizeof (int) for VL == 256. */
+ (svbool_t) n; /* This is OK. sizeof (svbool_t) == sizeof (int) for VL == 256. */
+ (svbool_t) (short)0; /* { dg-error {cannot convert a value of type 'short int'} } */
+ (svbool_t) (short)n; /* { dg-error {cannot convert a value of type 'short int'} } */
+ (svint8_t) sve_b1; /* { dg-error {cannot convert a value of type 'svbool_t'} } */
+ (gnu_uint8_t) sve_b1; /* { dg-error {cannot convert a value of type 'svbool_t'} } */
+ (gnu_int8_t) sve_b1; /* { dg-error {cannot convert a value of type 'svbool_t'} } */
+
/* Vector indexing. */
sve_u1[0];
gnu_u1++;
gnu_u1--;
+ /* Boolean unary ops. */
+
+ +sve_b1;
+ -sve_b1; /* { dg-error {negation operation not permitted} } */
+ ~sve_b1;
+ !sve_b1; /* { dg-error {wrong type argument to unary exclamation mark} } */
+ *sve_b1; /* { dg-error {invalid type argument of unary '\*'} } */
+ __real sve_b1; /* { dg-error {wrong type argument to __real} } */
+ __imag sve_b1; /* { dg-error {wrong type argument to __imag} } */
+ ++sve_b1; /* { dg-error {not permitted} } */
+ --sve_b1; /* { dg-error {not permitted} } */
+ sve_b1++; /* { dg-error {not permitted} } */
+ sve_b1--; /* { dg-error {not permitted} } */
+
/* Vector-vector binary arithmetic. */
sve_u1 + sve_u1;
sve_u1 && sve_u1; /* { dg-error {used vector type where scalar is required} } */
sve_u1 || sve_u1; /* { dg-error {used vector type where scalar is required} } */
+ /* Boolean vector-vector binary arithmetic. */
+
+ sve_b1 + sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 - sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 * sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 / sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 % sve_b1; /* { dg-error {invalid operands to binary} } */
+ sve_b1 & sve_b1;
+ sve_b1 | sve_b1;
+ sve_b1 ^ sve_b1;
+ sve_b1 == sve_b1;
+ sve_b1 != sve_b1;
+ sve_b1 <= sve_b1; /* { dg-error {only == and != operations permitted} } */
+ sve_b1 < sve_b1; /* { dg-error {only == and != operations permitted} } */
+ sve_b1 > sve_b1; /* { dg-error {only == and != operations permitted} } */
+ sve_b1 >= sve_b1; /* { dg-error {only == and != operations permitted} } */
+ sve_b1 << sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 >> sve_b1; /* { dg-error {not permitted} } */
+ sve_b1 && sve_b1; /* { dg-error {used vector type where scalar is required} } */
+ sve_b1 || sve_b1; /* { dg-error {used vector type where scalar is required} } */
+
sve_u1 + gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */
sve_u1 - gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */
sve_u1 * gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */
gnu_u1 ? sve_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */
gnu_u1 ? gnu_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */
+ /* Boolean conditional expressions. */
+
+ uc ? sve_b1 : sve_b2;
+
+ sve_b1 ? sve_u1 : sve_u1; /* { dg-error {used vector type where scalar is required} } */
+ sve_b1 ? gnu_u1 : sve_u1; /* { dg-error {used vector type where scalar is required} } */
+ sve_b1 ? sve_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */
+ sve_b1 ? gnu_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */
+
+ sve_u1 ? sve_b1 : sve_b2; /* { dg-error {used vector type where scalar is required} } */
+ gnu_u1 ? sve_b1 : sve_b2; /* { dg-error {used vector type where scalar is required} } */
+ gnu_u1 ? gnu_u1 : sve_b1; /* { dg-error {used vector type where scalar is required} } */
+ gnu_u1 ? sve_b1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */
+
/* Vector built-ins. */
__builtin_shuffle (sve_u1, sve_u1, sve_u1);
__builtin_convertvector (gnu_u1, svuint8_t);
__builtin_convertvector (sve_u1, gnu_uint8_t);
__builtin_convertvector (gnu_u1, gnu_uint8_t);
+
+ /* Boolean vector built-ins. */
+
+ __builtin_shuffle (sve_b1, sve_b1, sve_s1);
+ __builtin_shuffle (sve_b1, sve_b1, sve_u1);
+ __builtin_shuffle (sve_b1, sve_b1, gnu_s1);
+ __builtin_shuffle (sve_b1, sve_b1, gnu_u1);
+
+ __builtin_shuffle (sve_b1, gnu_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } */
+ __builtin_shuffle (gnu_u1, sve_b1, gnu_u1); /* { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } */
+
+ __builtin_convertvector (sve_b1, svint8_t);
+ __builtin_convertvector (sve_b1, svuint8_t);
+ __builtin_convertvector (sve_b1, gnu_int8_t);
+ __builtin_convertvector (sve_b1, gnu_uint8_t);
+
+ __builtin_convertvector (sve_s1, svbool_t);
+ __builtin_convertvector (gnu_s1, svbool_t);
+ __builtin_convertvector (sve_u1, svbool_t);
+ __builtin_convertvector (gnu_u1, svbool_t);
+
+ __builtin_convertvector (sve_b1, svint32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+ __builtin_convertvector (sve_b1, svuint32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+ __builtin_convertvector (sve_b1, gnu32_int32_t); /* { dg-error {'__builtin_convertvector' number of elements of the first argument vector and the second argument vector type should be the same} } */
+
+ __builtin_convertvector (sve_b1, gnu128_int32_t);
+ __builtin_convertvector (gnu128_s1, svbool_t);
}
svint32_t init_sve_vc8 = { 0, 1, 2, 3, 4, 5 }; /* { dg-error {excess elements in vector initializer} } */
svint32_t init_sve_vc9 = { 0, bar (), 2, 3, 4, n }; /* { dg-error {excess elements in vector initializer} } */
-
+ svbool_t init_sve_vb1 = { 0, -1 }; /* { dg-warning {overflow in conversion from} } */
+ svbool_t init_sve_vb2 = { 0, bar () };
+ svbool_t init_sve_vb3 = { bar (), n };
+ svbool_t init_sve_vb4 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; /* { dg-warning {overflow in conversion from} } */
+ svbool_t init_sve_vb5 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, bar (), 0, 0}; /* { dg-warning {overflow in conversion from} } */
+ svbool_t init_sve_vb6 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1}; /* { dg-error {excess elements in vector initializer} } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-1 } */
+ svbool_t init_sve_vb7 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, bar ()}; /* { dg-error {excess elements in vector initializer} } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-1 } */
+ svbool_t init_sve_vb8 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, bar (), -1}; /* { dg-error {excess elements in vector initializer} } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-1 } */
+ svbool_t init_sve_vb9 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, bar (), n}; /* { dg-error {excess elements in vector initializer} } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-1 } */
/* Compound literals. */
svint32_t init_sve_vc8 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; /* { dg-warning {excess elements in vector initializer} } */
svint32_t init_sve_vc9 = { 0, bar (), 2, 3, 4, 5, 6, 7, 8, 9, n }; /* { dg-warning {excess elements in vector initializer} } */
+ svbool_t init_sve_vb1 = { 0, -1 }; /* { dg-warning {overflow in conversion from} } */
+ svbool_t init_sve_vb2 = { 0, bar () };
+ svbool_t init_sve_vb3 = { bar (), n };
+ svbool_t init_sve_vb4 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-2 } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-2 } */
+ svbool_t init_sve_vb5 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, bar (), 0, 0, 0, 0, 0, 0,
+ 0, 0 };
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-3 } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-3 } */
+ svbool_t init_sve_vb6 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0 }; /* { dg-warning {excess elements in vector initializer} } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-3 } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-3 } */
+ svbool_t init_sve_vb7 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ bar () }; /* { dg-warning {excess elements in vector initializer} } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-3 } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-3 } */
+ svbool_t init_sve_vb8 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ bar (), -1 }; /* { dg-warning {excess elements in vector initializer} } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-3 } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-3 } */
+ svbool_t init_sve_vb9 = { 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ bar (), n}; /* { dg-warning {excess elements in vector initializer} } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-3 } */
+ /* { dg-warning "overflow in conversion from" "" { target *-*-* } .-3 } */
/* Compound literals. */