This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] Builtin functions
- From: Paul Brook <paul at nowt dot org>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: gcc-g95 List <gcc-g95-devel at lists dot sourceforge dot net>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 31 Aug 2003 01:10:53 +0100
- Subject: Re: [gfortran] Builtin functions
- References: <200308301900.11581.paul@nowt.org> <1062287454.8938.46.camel@frodo.toronto.redhat.com>
On Sunday 31 August 2003 12:50 am, Diego Novillo wrote:
> On Sat, 2003-08-30 at 14:00, Paul Brook wrote:
> > The attached patch maked gfortran handle builtin functions that same
> > way as java and g77. It avoids having to deal with all the messy
> > c-specific mess associated with using builtins.def.
> >
> > Applied to tree-ssa branch.
>
> Paul,
>
> I get a libgfortran build failure on alphaev67-unknown-linux-gnu with
> this patch:
I'd guess ABS_EXPR is getting expanded to __builtin_fabs. We never use this
directly, so I didn't bother defining it.
Does the patch below fix things?
Paul
--- /home/paul/cases/clean/tree-ssa/gcc/fortran/f95-lang.c
+++ ./f95-lang.c
@@ -882,6 +882,7 @@ gfc_init_builtin_functions (void)
#include "mathbuiltins.def"
+ DEFINE_MATH_BUILTIN (FABS, "fabs", 1);
/* We define there seperately as the fortran versions have different
semantics (they return an integer type) */
gfc_define_builtin ("__builtin_floor", mfunc_double[1],