2013-10-21 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-3.c
blob36fd50678923b9357a4e804b736fa9b4881fc592
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 } */
6 /* Double constants. */
8 #include <stdio.h>
9 void t(void);
10 static int g (double b, double c)
12 t();
13 return (int)(b+c);
15 static int f (double a)
17 if (a > 0)
18 g (a, 3.1);
19 else
20 g (a, 3.1);
22 int main ()
24 int i;
25 for (i = 0; i < 100; i++)
26 f (7.44);
27 return 0;
31 /* { dg-final { scan-ipa-dump "Creating a specialized node of f" "cp" } } */
32 /* { dg-final { scan-ipa-dump "replacing param .0 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 .0 b with const 7" "cp" } } */
35 /* { dg-final { scan-ipa-dump "replacing param .1 c with const 3" "cp" } } */
36 /* { dg-final { cleanup-ipa-dump "cp" } } */