Merged r157653 through r157895 into branch.
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-5.c
blob50af18e2b01c7301a87ff10277c4e0c662d9fa5a
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 /* Float & short constants. */
7 #include <stdio.h>
8 void t(void);
9 int g (float b, short c)
11 t();
12 return c + (int)b;
14 int f (float a)
16 t();
17 /* a is modified. */
18 if (a++ > 0)
19 g (a, 3);
21 int main ()
23 int i;
24 for (i = 0; i < 100; i++)
25 f (7.6);
26 return 0;
30 /* { dg-final { scan-ipa-dump-times "versioned function" 2 "cp" } } */
31 /* { dg-final { scan-ipa-dump "replacing param c with const 3" "cp" } } */
32 /* { dg-final { scan-ipa-dump "replacing param a with const 7" "cp" } } */
33 /* { dg-final { cleanup-ipa-dump "cp" } } */