OSDN Git Service

* gcc.c-torture/execute/simd-4.c (main): Make expected value
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Jun 2003 12:57:34 +0000 (12:57 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Jun 2003 12:57:34 +0000 (12:57 +0000)
endian-dependent.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68194 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/simd-4.c

index 0943139..6cb551a 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-19  J"orn Rennecke <joern.rennecke@superh.com>
+
+       * gcc.c-torture/execute/simd-4.c (main): Make expected value
+       endian-dependent.
+
 2003-06-17  Benjamin Kosnik  <bkoz@redhat.com>
 
        * lib/g++.exp (g++_include_flags): Tweak path to testsuite_flags.
index c8ddb53..3907375 100644 (file)
@@ -9,8 +9,11 @@ __ev_convert_s64 (v2si a)
 
 int main()
 {
+  union { long long ll; int i[2] } endianness_test;
+  endianness_test.ll = 1;
+  int little_endian = endianness_test.i[0];
   s64 = __ev_convert_s64 ((v2si){1,0xffffffff});
-  if (s64 != 0x1ffffffffLL)
+  if (s64 != (little_endian ? 0xffffffff00000001LL : 0x1ffffffffLL))
     abort ();
   return 0;
 }