111
|
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
|
|
19 double test1(double x)
|
|
20 {
|
|
21 return logb(x);
|
|
22 }
|
|
23
|
|
24 float test1f(float x)
|
|
25 {
|
|
26 return logbf(x);
|
|
27 }
|
|
28
|
|
29 long double test1l(long double x)
|
|
30 {
|
|
31 return logbl(x);
|
|
32 }
|
|
33
|
|
34 int test2(double x)
|
|
35 {
|
|
36 return ilogb(x);
|
|
37 }
|
|
38
|
|
39 int test2f(float x)
|
|
40 {
|
|
41 return ilogbf(x);
|
|
42 }
|
|
43
|
|
44 int test2l(long double x)
|
|
45 {
|
|
46 return ilogbl(x);
|
|
47 }
|
|
48
|