Merge from mainline
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-5.c
blobc99079de694803d21c7e9bdb0a9f884577c86153
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fipa-cp -fdump-ipa-cp" } */
3 /* { dg-skip-if "PR 25442" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
5 /* Float & short constants. */
7 #include <stdio.h>
8 int g (float b, short c)
10 return c + (int)b;
12 int f (float a)
14 /* a is modified. */
15 if (a++ > 0)
16 g (a, 3);
18 int main ()
20 f (7.6);
21 return 0;
25 /* { dg-final { scan-ipa-dump-times "versioned function" 2 "cp" } } */
26 /* { dg-final { scan-ipa-dump-times "propagating const" 2 "cp" } } */
27 /* { dg-final { cleanup-ipa-dump "cp" } } */