[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / pr80693.c
blob507177167e58a872e78fac505947f18526f7676b
1 /* { dg-do run } */
2 /* { dg-options "-O -fno-tree-coalesce-vars" } */
3 typedef unsigned char u8;
4 typedef unsigned short u16;
5 typedef unsigned u32;
6 typedef unsigned long long u64;
8 static u64 __attribute__((noinline, noclone))
9 foo(u8 u8_0, u16 u16_0, u32 u32_0, u64 u64_0, u16 u16_1)
11 u16_1 += 0x1051;
12 u16_1 &= 1;
13 u8_0 <<= u32_0 & 7;
14 u16_0 -= !u16_1;
15 u16_1 >>= ((u16)-u8_0 != 0xff);
16 return u8_0 + u16_0 + u64_0 + u16_1;
19 int
20 main (void)
22 u64 x = foo(1, 1, 0xffff, 0, 1);
23 if (x != 0x80)
24 __builtin_abort();
25 return 0;