OSDN Git Service

* builtins.c (expand_builtin_mathfn): Add pow10* to the
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / builtins-34.c
1 /* Copyright (C) 2004 Free Software Foundation.
2
3    Check that exp10, exp10f, exp10l, exp2, exp2f, exp2l, pow10, pow10f
4    and pow10l built-in functions compile.
5
6    Written by Uros Bizjak, 13th February 2004.  */
7
8 /* { dg-do compile } */
9 /* { dg-options "-O2 -ffast-math" } */
10
11 extern double exp10(double);
12 extern double exp2(double);
13 extern double pow10(double);
14 extern float exp10f(float);
15 extern float exp2f(float);
16 extern float pow10f(float);
17 extern long double exp10l(long double);
18 extern long double exp2l(long double);
19 extern long double pow10l(long double);
20
21
22 double test1(double x)
23 {
24   return exp10(x);
25 }
26
27 double test2(double x)
28 {
29   return exp2(x);
30 }
31
32 double test3(double x)
33 {
34   return pow10(x);
35 }
36
37 float test1f(float x)
38 {
39   return exp10f(x);
40 }
41
42 float test2f(float x)
43 {
44   return exp2f(x);
45 }
46
47 float test3f(float x)
48 {
49   return pow10f(x);
50 }
51
52 long double test1l(long double x)
53 {
54   return exp10l(x);
55 }
56
57 long double test2l(long double x)
58 {
59   return exp2l(x);
60 }
61
62 long double test3l(long double x)
63 {
64   return pow10l(x);
65 }
66