PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-7.c
blob646278b8d73842ad1c77a8df3f79e7479daa2195
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 void send_addr (int *);
7 int g (int b, int c)
9 printf ("%d %d\n", b, c);
11 int f (int a)
13 if (a > 0)
14 g (a, 3);
15 else
16 g (a, 5);
18 send_addr (&a);
20 int main ()
22 int i;
23 for (i = 0; i < 100; i++)
24 f (7);
25 return 0;
29 /* { dg-final { scan-ipa-dump "Creating a specialized node of f" "cp" } } */
30 /* { dg-final { scan-ipa-dump-times "replacing param .. . with const 7" 1 "cp" } } */