From 46847aa6e79a40d2d569c726a50dc920e6ef2d81 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Fri, 7 Feb 2003 22:37:57 +0000 Subject: 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 --- gcc/testsuite/gcc.dg/builtins-4.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/builtins-4.c (limited to 'gcc/testsuite/gcc.dg/builtins-4.c') 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); } + -- cgit v1.1