Commit 6f651bae by Richard Biener Committed by Richard Biener

re PR tree-optimization/69047 (memcpy is not as optimized as union is)

2016-08-30  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69047
	* gcc.dg/pr69047.c: Fix byte-order check.

From-SVN: r239857
parent 5116b156
2016-08-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/69047
* gcc.dg/pr69047.c: Fix byte-order check.
2016-08-30 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/72866
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment