2018-04-09 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr69535.c
blob4b4dad154daff004506672fe7096704d2fc7dbe0
1 /* { dg-do run { target int128 } } */
2 /* { dg-options "-O -fno-tree-bit-ccp -fno-tree-reassoc" } */
4 typedef unsigned char u8;
5 typedef unsigned short u16;
6 typedef unsigned int u32;
7 typedef unsigned long long u64;
8 typedef unsigned __int128 u128;
10 void __attribute__((noinline, noclone))
11 dirtify_stack(void)
13 volatile char a[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
14 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
15 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
16 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
19 u128 __attribute__ ((noinline, noclone))
20 foo(u32 u32_1, u64 u64_1, u128 u128_1, u8 u8_2, u16 u16_2, u32 u32_2, u8 u8_3)
22 u128_1 /= ~u128_1 | 1;
23 u8_3 = ((u8_3 << 2) >> 1) << 7;
24 u32_2 >>= u8_3;
25 return u128_1 + u32_2 + u8_3;
28 int
29 main ()
31 dirtify_stack();
32 u128 x = foo(1, 1, 1, 1, 1, 1, 0);
33 if (x != 1)
34 __builtin_abort();
35 return 0;