]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pr94873.c
1 /* PR rtl-optimization/94873 */
2 /* { dg-do run { target int128 } } */
3 /* { dg-options "-O -fno-merge-constants -fno-split-wide-types -fno-tree-fre" } */
5 __attribute__((noipa
)) void
6 foo (const char *p
, int q
)
8 if (p
[0] != '%' || p
[1] != '0' || p
[2] != '2' || p
[3] != 'x' || p
[4] != '\0')
10 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
11 if ((unsigned char) q
!= 0x95)
13 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
14 if ((unsigned char) q
!= 0)
22 union U
{ __int128 a
; char b
[sizeof (__int128
)]; };
23 char x
= ((union U
){ .a
= 0xF4409395252B9560ULL
}).b
[1];
24 for (unsigned i
= 0; i
< sizeof (x
); i
++)
25 foo ("%02x", i
[(volatile unsigned char *) &x
]);