No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / pr32912-1.c
blob2f9e8593e292ce7ea0288f77c57cd173ad0b2888
1 /* PR middle-end/32912 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -w" } */
5 extern void abort (void);
7 typedef int __m128i __attribute__ ((__vector_size__ (16)));
9 __m128i a, b, c, d, e, f;
11 void
12 foo (__m128i x)
14 a = x ^ ~x;
15 b = ~x ^ x;
16 c = x | ~x;
17 d = ~x | x;
18 e = x & ~x;
19 f = ~x & x;
22 int
23 main (void)
25 union { __m128i v; int i[sizeof (__m128i) / sizeof (int)]; } u;
26 int i;
28 for (i = 0; i < sizeof (u.i) / sizeof (u.i[0]); i++)
29 u.i[i] = i * 49 - 36;
30 foo (u.v);
31 #define check(x, val) \
32 u.v = (x); \
33 for (i = 0; i < sizeof (u.i) / sizeof (u.i[0]); i++) \
34 if (u.i[i] != (val)) \
35 abort ()
37 check (a, ~0);
38 check (b, ~0);
39 check (c, ~0);
40 check (d, ~0);
41 check (e, 0);
42 check (f, 0);
43 return 0;