Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.c-torture / execute / 20050316-3.c
blob773243f229fbb0b0c7ce21e5ca13aa8b10425b8c
1 extern void abort (void);
3 typedef int V2SI __attribute__ ((vector_size (8)));
4 typedef unsigned int V2USI __attribute__ ((vector_size (8)));
5 typedef short V2HI __attribute__ ((vector_size (4)));
6 typedef unsigned int V2UHI __attribute__ ((vector_size (4)));
8 V2USI
9 test1 (V2SI x)
11 return (V2USI) (V2SI) (long long) x;
14 long long
15 test2 (V2SI x)
17 return (long long) (V2USI) (V2SI) (long long) x;
20 int
21 main (void)
23 if (sizeof (short) != 2 || sizeof (int) != 4 || sizeof (long long) != 8)
24 return 0;
26 union { V2SI x; int y[2]; V2USI z; long long l; } u;
27 V2SI a = { -3, -3 };
28 u.z = test1 (a);
29 if (u.y[0] != -3 || u.y[1] != -3)
30 abort ();
32 u.l = test2 (a);
33 if (u.y[0] != -3 || u.y[1] != -3)
34 abort ();
35 return 0;