diff mbox series

[Committed] PR testsuite/103477: Fix big-endian mistake in new test case.

Message ID 016801d7e5d6$3a2a1f00$ae7e5d00$@nextmovesoftware.com
State Committed
Commit 92de188ea3d36ec012b6d42959d4722e42524256
Headers show
Series [Committed] PR testsuite/103477: Fix big-endian mistake in new test case. | expand

Commit Message

Roger Sayle Nov. 30, 2021, 10:37 a.m. UTC
I missed a spot when adding the "#if __BYTE_ORDER__ == ..." guards to

the new test case for PR tree-optimization/103345.  Committed as obvious.

 

 

2021-11-30  Roger Sayle  <roger@nextmovesoftware.com>

 

gcc/testsuite/ChangeLog

PR testsuite/103477

* gcc.dg/tree-ssa/pr103345.c: Correct xor test for big-endian.

 

Roger

--
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c b/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c
index 94388b541c1..dc8810ab5af 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c
@@ -42,10 +42,10 @@  uint32_t load_le_32_xor(const uint8_t *ptr)
          ((uint32_t)ptr[2] << 16) ^
          ((uint32_t)ptr[3] << 24);
 #else
-  return ((uint32_t)ptr[0]) ^
-         ((uint32_t)ptr[1] << 8) ^
-         ((uint32_t)ptr[2] << 16) ^
-         ((uint32_t)ptr[3] << 24);
+  return ((uint32_t)ptr[3]) ^
+         ((uint32_t)ptr[2] << 8) ^
+         ((uint32_t)ptr[1] << 16) ^
+         ((uint32_t)ptr[0] << 24);
 #endif
 }