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