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 } */ 4 5/* Float & short constants. */ 6 7#include <stdio.h> 8int t(void); 9int g (float b, short c) 10{ 11 t(); 12 return c + (int)b; 13} 14int f (float a) 15{ 16 int i, j = t(); 17 /* a is modified. */ 18 if (a++ > 0) 19 for (i = 0; i < j; i++) 20 g (a, 3); 21} 22int main () 23{ 24 int i; 25 for (i = 0; i < 100; i++) 26 f (7.6); 27 return 0; 28} 29 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" } } */ 33/* { dg-final { cleanup-ipa-dump "cp" } } */ 34