2014-07-29 Ed Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / gcc.dg / simd-1b.c
blob44c39c2ef96f3c920ab30d80ba32f7ef13f4926b
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;
18 c &= d;
19 a |= b;
20 c ^= d;
21 a >>= b;
22 c <<= d;
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" } */