PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-5.c
blobe4f77a967682c44cb26902cbeff520df3997e220
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 int t(void);
9 int g (float b, short c)
11 t();
12 return c + (int)b;
14 int f (float a)
16 int i, j = t();
17 /* a is modified. */
18 if (a++ > 0)
19 for (i = 0; i < j; i++)
20 g (a, 3);
22 int main ()
24 int i;
25 for (i = 0; i < 100; i++)
26 f (7.6);
27 return 0;
30 /* { dg-final { scan-ipa-dump-times "Creating a specialized node" 3 "cp" } } */
31 /* { dg-final { scan-ipa-dump "replacing param .1 c with const 3" "cp" } } */
32 /* { dg-final { scan-ipa-dump "replacing param .0 a with const 7" "cp" } } */