diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-05-23 20:45:40 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-05-23 20:45:40 +0000 |
commit | 29f523bef0d37fedc90c9c4d73ed7fd6b5e8237c (patch) | |
tree | 2d249c1630830eb3302bb11242b3adef2ac554a9 /gcc/testsuite | |
parent | a7050d49c52f3596fd94474499772b2bf330f886 (diff) | |
download | gcc-29f523bef0d37fedc90c9c4d73ed7fd6b5e8237c.zip gcc-29f523bef0d37fedc90c9c4d73ed7fd6b5e8237c.tar.gz gcc-29f523bef0d37fedc90c9c4d73ed7fd6b5e8237c.tar.bz2 |
builtins.def: Defome atan...
* builtins.def: Defome atan, atanf, atanl, tan, tanf and tanl
builtin functions (and their __builtin_* variants).
* builtins.c (mathfn_built_in): Handle tan{,f,l} and atan{,f,l}.
(expand_builtin): Don't expand tan{,f,l} or atan{,f,l} when not
optimizing.
* doc/extend.texi: Document new tan and atan builtins, and
their float and long double variants.
* gcc.dg/builtins-1.c: Add tests for tan and atan.
* gcc.dg/builtins-4.c: Add test for fmod.
From-SVN: r67137
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-1.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-4.c | 4 |
3 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d0beb83..071cc4b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-05-23 Roger Sayle <roger@eyesopen.com> + + * gcc.dg/builtins-1.c: Add tests for tan and atan. + * gcc.dg/builtins-4.c: Add test for fmod. + 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> PR c++/10682 diff --git a/gcc/testsuite/gcc.dg/builtins-1.c b/gcc/testsuite/gcc.dg/builtins-1.c index 6b4044c..33160ab 100644 --- a/gcc/testsuite/gcc.dg/builtins-1.c +++ b/gcc/testsuite/gcc.dg/builtins-1.c @@ -13,16 +13,22 @@ double test2(double x) { return __builtin_cos(x); } double test3(double x) { return __builtin_sin(x); } double test4(double x) { return __builtin_exp(x); } double test5(double x) { return __builtin_log(x); } +double test6(double x) { return __builtin_tan(x); } +double test7(double x) { return __builtin_atan(x); } float test1f(float x) { return __builtin_sqrtf(x); } float test2f(float x) { return __builtin_cosf(x); } float test3f(float x) { return __builtin_sinf(x); } float test4f(float x) { return __builtin_expf(x); } float test5f(float x) { return __builtin_logf(x); } +float test6f(float x) { return __builtin_tanf(x); } +float test7f(float x) { return __builtin_atanf(x); } long double test1l(long double x) { return __builtin_sqrtl(x); } long double test2l(long double x) { return __builtin_cosl(x); } long double test3l(long double x) { return __builtin_sinl(x); } long double test4l(long double x) { return __builtin_expl(x); } long double test5l(long double x) { return __builtin_logl(x); } +long double test6l(long double x) { return __builtin_tanl(x); } +long double test7l(long double x) { return __builtin_atanl(x); } diff --git a/gcc/testsuite/gcc.dg/builtins-4.c b/gcc/testsuite/gcc.dg/builtins-4.c index 95a1917..55e2c91 100644 --- a/gcc/testsuite/gcc.dg/builtins-4.c +++ b/gcc/testsuite/gcc.dg/builtins-4.c @@ -10,12 +10,16 @@ double test1(double x, double y) { return __builtin_pow(x,y); } double test2(double x, double y) { return __builtin_atan2(x,y); } +double test3(double x, double y) { return __builtin_fmod(x,y); } float test1f(float x, float y) { return __builtin_powf(x,y); } float test2f(float x, float y) { return __builtin_atan2f(x,y); } +float test3f(float x, float y) { return __builtin_fmodf(x,y); } long double test1l(long double x, long double y) { return __builtin_powl(x,y); } long double test2l(long double x, long double y) { return __builtin_atan2l(x,y); } +long double test3l(long double x, long double y) +{ return __builtin_fmodl(x,y); } |