OSDN Git Service

edea7f900b409c15e755c2c40379855b0f2291ba
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / ipa / ipa-8.c
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 } */
4
5 #include <stdio.h>
6 static int g (int b, int c)
7 {
8   printf ("%d %d\n", b, c);
9 }
10 static int f (int a)
11 {
12   /* Second parameter of g gets different values.  */
13   if (a > 0)
14     g (a, 3);
15   else
16     g (a, 5);
17 }
18 int main ()
19 {
20   f (7);
21   return 0;
22 }
23
24
25 /* { dg-final { scan-ipa-dump-times "versioned function" 2 "cp"  } } */
26 /* { dg-final { scan-ipa-dump "replacing param a with const 7" "cp"  } } */
27 /* { dg-final { scan-ipa-dump "replacing param b with const 7" "cp"  } } */
28 /* { dg-final { cleanup-ipa-dump "cp" } } */
29
30