PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / pr81020.c
blob4c70236d88fa3d0f517f5c93e17ad965621a4069
1 /* PR rtl-optimization/81020 */
2 /* { dg-do run } */
3 /* { dg-options "-O -fno-tree-bit-ccp -fno-tree-coalesce-vars -fno-tree-vrp" } */
5 unsigned v = 4;
7 unsigned long long __attribute__((noipa))
8 foo (unsigned x)
10 #if __SIZEOF_INT__ == 2
11 __UINT32_TYPE__ a = v;
12 #else
13 unsigned a = v;
14 #endif
15 a &= 1;
16 x |= 0 < a;
17 a >>= 31;
18 return x + a;
21 int
22 main ()
24 if (foo (2) != 2)
25 __builtin_abort ();
26 return 0;