PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-1.c
blobdfa04e79ed79f9bac46fada89d79757df1711d70
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 #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 int i;
21 for (i = 0; i < 100; i++)
22 f (7);
23 return 0;
27 /* { dg-final { scan-ipa-dump "Creating a specialized node of f" "cp" } } */
28 /* { dg-final { scan-ipa-dump "replacing param .0 a with const 7" "cp" } } */