1 /* { dg-do compile } */
2 /* { dg-options "-Wall" } */
4 /* Origin: Aldy Hernandez <aldyh@redhat.com>. */
5 /* Purpose: Program to test generic SIMD support. */
7 typedef float __attribute__((vector_size(8))) v2sf;
8 typedef float __attribute__((vector_size(16))) v4sf;
9 typedef double __attribute__((vector_size(16))) v2df;
25 /* Assignment of different types. */
26 b = c; /* { dg-error "incompatible types in assignment" } */
27 d = a; /* { dg-error "incompatible types in assignment" } */
29 /* Casting between SIMDs of the same size. */
32 /* Assignment between scalar and SIMD of different size. */
33 foo = a; /* { dg-error "incompatible types in assignment" } */
35 /* Casted assignment between scalar and SIMD of same size. */
36 foo = (typeof (foo)) foo2; /* { dg-error "aggregate value used where a float was expected" } */
38 /* Casted assignment between scalar and SIMD of different size. */
39 foo1 = (typeof (foo1)) foo2; /* { dg-error "aggregate value used where a float was expected" } */
41 /* Operators on compatible SIMD types. */
49 /* Operators on incompatible SIMD types. */
50 a = b + c; /* { dg-error "invalid operands to binary" } */
51 a = b - c; /* { dg-error "invalid operands to binary" } */
52 a = b * c; /* { dg-error "invalid operands to binary" } */
53 a = b / c; /* { dg-error "invalid operands to binary" } */