diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-02-07 22:37:57 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-02-07 22:37:57 +0000 |
commit | 46847aa6e79a40d2d569c726a50dc920e6ef2d81 (patch) | |
tree | 5831f8d64256959cde2af68fd1808297950ca51d /gcc/testsuite/gcc.dg/builtins-4.c | |
parent | c48d6750f4d60f288eae97b09dc7e4e4a025b3d9 (diff) | |
download | gcc-46847aa6e79a40d2d569c726a50dc920e6ef2d81.zip gcc-46847aa6e79a40d2d569c726a50dc920e6ef2d81.tar.gz gcc-46847aa6e79a40d2d569c726a50dc920e6ef2d81.tar.bz2 |
builtin-types.def (BT_FN_FLOAT_FLOAT_FLOAT): New built-in type.
* builtin-types.def (BT_FN_FLOAT_FLOAT_FLOAT): New built-in type.
(BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE): Likewise.
(BT_FN_DOUBLE_DOUBLE_DOUBLE): Likewise.
* builtins.def: Define pow, powf, powl, atan2, atan2f and atan2l
builtin functions (and their __builtin_* variants).
* builtins.c (mathfn_built_in): Handle missing log{,f,l} cases.
(expand_builtin): Don't expand log{,f,l}, pow{,f,l} or atan2{,f,l}
when not optimizing.
* doc/extend.texi: Document new pow and atan2 builtins, and
their float and long double variants. Realphabetize builtins.
* testsuite/gcc.dg/builtins-4.c: New test case.
From-SVN: r62551
Diffstat (limited to 'gcc/testsuite/gcc.dg/builtins-4.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-4.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/builtins-4.c b/gcc/testsuite/gcc.dg/builtins-4.c new file mode 100644 index 0000000..95a1917 --- /dev/null +++ b/gcc/testsuite/gcc.dg/builtins-4.c @@ -0,0 +1,21 @@ +/* Copyright (C) 2003 Free Software Foundation. + + Verify that all the binary __builtin_ math functions are + recognized by the compiler. + + Written by Roger Sayle, 6th February 2002. */ + +/* { dg-do compile } */ +/* { dg-final { scan-assembler-not "__builtin_" } } */ + +double test1(double x, double y) { return __builtin_pow(x,y); } +double test2(double x, double y) { return __builtin_atan2(x,y); } + +float test1f(float x, float y) { return __builtin_powf(x,y); } +float test2f(float x, float y) { return __builtin_atan2f(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); } + |