1 /* { dg-do run { target int128 } } */
2 /* { dg-additional-options "-fgcse-after-reload" } */
3 
4 typedef unsigned char u8;
5 typedef unsigned short u16;
6 typedef unsigned int u32;
7 typedef unsigned long long u64;
8 int a, b, c;
9 __int128 e;
10 int
d(u16 g)11 d (u16 g)
12 {
13   u64 f = __builtin_bswap64 (c);
14   f = g == a;
15 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
16   __builtin_memmove (&f, &e, 1);
17 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
18   __builtin_memmove ((char *) &f + sizeof (f) - 1,
19 		     (char *) &e + sizeof (e) - 1, 1);
20 #elif __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__
21   __builtin_memmove ((char *) &f + sizeof (f) - 2,
22 		     (char *) &e + sizeof (e) - 2, 1);
23 #else
24 #error "endian unknown?"
25 #endif
26   e >>= b;
27   return a + f;
28 }
29 
30 int
main(void)31 main (void)
32 {
33   __int128 x = d (0);
34   if (x != 0)
35     __builtin_abort ();
36   return 0;
37 }
38