1 /* Copyright (C) 2004 Free Software Foundation. 2 3 Check that logb, logbf, logbl, ilogb, ilogbf and ilogbl 4 built-in functions compile. 5 6 Written by Uros Bizjak, 14th April 2004. */ 7 8 /* { dg-do compile } */ 9 /* { dg-options "-O2 -ffast-math" } */ 10 11 extern double logb(double); 12 extern float logbf(float); 13 extern long double logbl(long double); 14 extern int ilogb(double); 15 extern int ilogbf(float); 16 extern int ilogbl(long double); 17 18 test1(double x)19double test1(double x) 20 { 21 return logb(x); 22 } 23 test1f(float x)24float test1f(float x) 25 { 26 return logbf(x); 27 } 28 test1l(long double x)29long double test1l(long double x) 30 { 31 return logbl(x); 32 } 33 test2(double x)34int test2(double x) 35 { 36 return ilogb(x); 37 } 38 test2f(float x)39int test2f(float x) 40 { 41 return ilogbf(x); 42 } 43 test2l(long double x)44int test2l(long double x) 45 { 46 return ilogbl(x); 47 } 48 49