PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / pr85529.c
blob0b732284749d69dc61d780b479afcf30406a4f37
1 /* PR tree-optimization/85529 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -fno-ssa-phiopt" } */
5 __attribute__((noinline, noclone)) int
6 foo (int x)
8 x &= 31;
9 x -= 25;
10 x *= 2;
11 if (x < 0)
12 return 1;
13 int y = x >> 2;
14 if (x >= y)
15 return 1;
16 return 0;
19 int
20 main ()
22 int i;
23 for (i = 0; i < 63; i++)
24 if (foo (i) != 1)
25 __builtin_abort ();
26 return 0;