2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr69047.c
blob63d9fd90e83127b9a52b8cb238dd84ac64011253
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-cddce1" } */
4 __UINT8_TYPE__
5 f(__UINT16_TYPE__ b)
7 __UINT8_TYPE__ a;
8 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
9 __builtin_memcpy(&a, &b, sizeof a);
10 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
11 __builtin_memcpy(&a, (char *)&b + sizeof a, sizeof a);
12 #else
13 a = b;
14 #endif
15 return a;
18 /* { dg-final { scan-tree-dump "_\[0-9\]+ = \\(\[^)\]+\\) b" "cddce1" } } */