PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / vrp7.c
blobe4e0bc66a645420d3815db349fa0329da5aa5580
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-cp-details" } */
4 volatile int cond;
5 int abs (int);
7 static __attribute__((noinline, noclone))
8 int foo (int i)
10 if (i < 5)
11 __builtin_abort ();
12 return 0;
15 static __attribute__((noinline, noclone))
16 int bar (int j)
18 foo (~j);
19 foo (abs (j));
20 foo (j);
21 return 0;
24 int main ()
26 for (unsigned int i = 0; i < 10; ++i)
27 bar (i);
29 return 0;
32 /* { dg-final { scan-ipa-dump-times "Setting value range of param 0 \\\[-10, 9\\\]" 1 "cp" } } */