From: Richard Biener Date: Tue, 30 Aug 2016 09:22:17 +0000 (+0000) Subject: re PR tree-optimization/69047 (memcpy is not as optimized as union is) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6f651baeb7092ada83febdaebb0f5e22eef184c8;p=gcc.git 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 --- 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;