Merged r157653 through r157895 into branch.
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-4.c
blob3cb0cd4d27ed828e293e2e29fd34e54f98d5c2da
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining" } */
3 /* { dg-add-options bind_pic_locally } */
5 #include <stdio.h>
6 int g (int b, int c)
8 printf ("%d %d\n", b, c);
10 int f (int a)
12 /* First and second parameter of g gets different values. */
14 if (a > 0)
15 g (a, 3);
16 else
17 g (a+1, 5);
19 int main ()
21 int i;
22 for (i = 0; i < 100; i++)
23 f (7);
24 return 0;
28 /* { dg-final { scan-ipa-dump-times "versioned function" 1 "cp" } } */
29 /* { dg-final { scan-ipa-dump-times "replacing param a with const 7" 1 "cp" } } */
30 /* { dg-final { cleanup-ipa-dump "cp" } } */