Merge from mainline
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-1.c
blobcdac76e701afda68b6a817508c4ff675b81c1dbe
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fipa-cp -fdump-ipa-cp" } */
3 /* { dg-skip-if "PR 25442" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
5 #include <stdio.h>
6 int g (int b, int c)
8 printf ("%d %d\n", b, c);
10 int f (int a)
12 /* Second parameter of g gets different values. */
13 if (a > 0)
14 g (a, 3);
15 else
16 g (a, 5);
18 int main ()
20 f (7);
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" } } */