1 /* PR rtl-optimization/99905 */
2 /* { dg-do run { target int128 } } */
3 /* { dg-options "-Os -mno-mmx -mno-sse" } */
4 
5 typedef unsigned char U;
6 typedef unsigned char __attribute__((__vector_size__ (8))) A;
7 typedef unsigned char __attribute__((__vector_size__ (16))) B;
8 typedef unsigned char __attribute__((__vector_size__ (32))) C;
9 typedef unsigned int __attribute__((__vector_size__ (8))) D;
10 typedef unsigned long long __attribute__((__vector_size__ (8))) E;
11 typedef unsigned __int128 I;
12 typedef unsigned long long L;
13 
14 D gv;
15 I gi;
16 
17 L __attribute__((__noipa__))
foo(int ua,int ub,int uc,int ud,E ue,I i)18 foo (int ua, int ub, int uc, int ud, E ue, I i)
19 {
20   D d = (U) __builtin_bswap16 (i >> 63) + gv;
21   B y = ((union { C a; B b[2];}) (C){ }).b[0] + (B) gi;
22   A z = ((union { B a; A b[2];}) y).b[0] + (A) d;
23   return (L)z;
24 }
25 
26 int
main()27 main ()
28 {
29   L x = foo (0, 0, 0, 0, (E) { }, (I) 0x100 << 63);
30   if (x != 0x100000001)
31     __builtin_abort ();
32   return 0;
33 }
34