From 6f651baeb7092ada83febdaebb0f5e22eef184c8 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 30 Aug 2016 09:22:17 +0000 Subject: [PATCH] re PR tree-optimization/69047 (memcpy is not as optimized as union is) 2016-08-30 Richard Biener PR tree-optimization/69047 * gcc.dg/pr69047.c: Fix byte-order check. From-SVN: r239857 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr69047.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1691cff63a1..613753e925a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-08-30 Richard Biener + + PR tree-optimization/69047 + * gcc.dg/pr69047.c: Fix byte-order check. + 2016-08-30 Jakub Jelinek PR tree-optimization/72866 diff --git a/gcc/testsuite/gcc.dg/pr69047.c b/gcc/testsuite/gcc.dg/pr69047.c index 0227df231d8..63d9fd90e83 100644 --- a/gcc/testsuite/gcc.dg/pr69047.c +++ b/gcc/testsuite/gcc.dg/pr69047.c @@ -5,9 +5,9 @@ __UINT8_TYPE__ f(__UINT16_TYPE__ b) { __UINT8_TYPE__ a; -#if __BYTE_ORDER == __LITTLE_ENDIAN +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ __builtin_memcpy(&a, &b, sizeof a); -#elif __BYTE_ORDER == __BIG_ENDIAN +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ __builtin_memcpy(&a, (char *)&b + sizeof a, sizeof a); #else a = b; -- 2.30.2