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
6 /* Double constants. */
7
8 #include <stdio.h>
9 void t(void);
g(double b,double c)10 static int g (double b, double c)
11 {
12 t();
13 return (int)(b+c);
14 }
f(double a)15 static int f (double a)
16 {
17 if (a > 0)
18 g (a, 3.1);
19 else
20 g (a, 3.1);
21 }
main()22 int main ()
23 {
24 int i;
25 for (i = 0; i < 100; i++)
26 f (7.44);
27 return 0;
28 }
29
30
31 /* { dg-final { scan-ipa-dump "Creating a specialized node of f" "cp" } } */
32 /* { dg-final { scan-ipa-dump "replacing param a with const 7" "cp" } } */
33 /* { dg-final { scan-ipa-dump "Creating a specialized node of g" "cp" } } */
34 /* { dg-final { scan-ipa-dump "replacing param b with const 7" "cp" } } */
35 /* { dg-final { scan-ipa-dump "replacing param c with const 3" "cp" } } */
36 /* { dg-final { cleanup-ipa-dump "cp" } } */
37