PR middle-end/27945
[official-gcc.git] / gcc / testsuite / gcc.dg / simd-1b.c
blob56d94b91c68fa9e5f092b50b5a0187588bc336c9
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 int __attribute__((vector_size (16))) v4si;
8 typedef int __attribute__((vector_size (8))) v2si;
10 v4si a, b;
11 v2si c, d;
13 void
14 hanneke ()
16 /* Operators on compatible SIMD types. */
17 a %= b; /* { dg-error "invalid operands to binary %" } */
18 c &= d;
19 a |= b;
20 c ^= d;
21 a >>= b; /* { dg-error "invalid operands to binary >>" } */
22 c <<= d; /* { dg-error "invalid operands to binary <<" } */
23 a = +b;
24 c = ~d;
26 /* Operators on incompatible SIMD types. */
27 a = b % c; /* { dg-error "invalid operands to binary" } */
28 a = b % c; /* { dg-error "invalid operands to binary" } */
29 d = c & b; /* { dg-error "invalid operands to binary" } */
30 a = b | c; /* { dg-error "invalid operands to binary" } */
31 d = c ^ b; /* { dg-error "invalid operands to binary" } */
32 a = b >> c; /* { dg-error "invalid operands to binary" } */
33 a = b >> c; /* { dg-error "invalid operands to binary" } */
34 d = c << b; /* { dg-error "invalid operands to binary" } */
35 d = c << b; /* { dg-error "invalid operands to binary" } */