PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / vrp2.c
blobc720e5ce8d4ccee0afb39fd47d350e02eec5191b
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-cp-details" } */
4 static __attribute__((noinline, noclone))
5 int foo (int i)
7 if (i < 4)
8 __builtin_abort ();
9 return 0;
12 static __attribute__((noinline, noclone))
13 int bar (int j)
15 if (j > 8)
16 return foo (j + 2);
17 else if (j > 2)
18 return foo (j + 3);
20 return 0;
23 int main ()
25 foo (100);
26 for (unsigned int i = 0; i < 12; ++i)
28 bar (i);
30 foo (4);
31 return 0;
34 /* { dg-final { scan-ipa-dump "Setting value range of param 0 \\\[4," "cp" } } */
35 /* { dg-final { scan-ipa-dump "Setting value range of param 0 \\\[0, 11\\\]" "cp" } } */