libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / vrp2.c
blobb3ef9273891e14472da7ce4b7233e9cb6ef64cb2
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 \\(now 0\\).* \\\[4," "cp" } } */
35 /* { dg-final { scan-ipa-dump "Setting value range of param 0 \\(now 0\\).* \\\[0, 11\\\]" "cp" } } */