1/* Verify whether math functions are simplified. */ 2/* { dg-require-effective-target c99_runtime } */ 3double sin(double); 4double floor(double); 5float 6t(float a) 7{ 8 return sin(a); 9} 10float 11q(float a) 12{ 13 return floor(a); 14} 15double 16q1(float a) 17{ 18 return floor(a); 19} 20main() 21{ 22#ifdef __OPTIMIZE__ 23 if (t(0)!=0) 24 abort (); 25 if (q(0)!=0) 26 abort (); 27 if (q1(0)!=0) 28 abort (); 29#endif 30 return 0; 31} 32__attribute__ ((noinline)) 33double 34floor(double a) 35{ 36 abort (); 37} 38__attribute__ ((noinline)) 39float 40floorf(float a) 41{ 42 return a; 43} 44__attribute__ ((noinline)) 45double 46sin(double a) 47{ 48 return a; 49} 50__attribute__ ((noinline)) 51float 52sinf(float a) 53{ 54 abort (); 55} 56