OSDN Git Service

5942839b30a88ec292d1088408d34d89c06c6e1d
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / simd-4.c
1 typedef long __attribute__((vector_size(8))) v2si;
2 long long s64;
3
4 static inline long long
5 __ev_convert_s64 (v2si a)
6 {
7   return (long long) a;
8 }
9
10 int main()
11 {
12   union { long long ll; long i[2]; } endianness_test;
13   endianness_test.ll = 1;
14   int little_endian = endianness_test.i[0];
15   s64 = __ev_convert_s64 ((v2si){1,0xffffffff});
16   if (s64 != (little_endian ? 0xffffffff00000001LL : 0x1ffffffffLL))
17     abort ();
18   return 0;
19 }