* expmed.c (flip_storage_order): Deal with complex modes specially.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20050316-3.c
blob9f35ece42812757e9d00dcdfca2b2276dde77129
1 /* { dg-options "-Wno-psabi" } */
2 extern void abort (void);
4 typedef int V2SI __attribute__ ((vector_size (8)));
5 typedef unsigned int V2USI __attribute__ ((vector_size (8)));
6 typedef short V2HI __attribute__ ((vector_size (4)));
7 typedef unsigned int V2UHI __attribute__ ((vector_size (4)));
9 V2USI
10 test1 (V2SI x)
12 return (V2USI) (V2SI) (long long) x;
15 long long
16 test2 (V2SI x)
18 return (long long) (V2USI) (V2SI) (long long) x;
21 int
22 main (void)
24 if (sizeof (short) != 2 || sizeof (int) != 4 || sizeof (long long) != 8)
25 return 0;
27 union { V2SI x; int y[2]; V2USI z; long long l; } u;
28 V2SI a = { -3, -3 };
29 u.z = test1 (a);
30 if (u.y[0] != -3 || u.y[1] != -3)
31 abort ();
33 u.l = test2 (a);
34 if (u.y[0] != -3 || u.y[1] != -3)
35 abort ();
36 return 0;