[Patch, fortran] Use BUILT_IN_IROUND

Tobias Burnus burnus@net-b.de
Thu Mar 15 20:15:00 GMT 2012


Janne Blomqvist wrote:
> since some time GCC has BUILT_IN_IROUND{F,,L}, similar to lround() and
> llround() but the result is returned as an integer.
>
> Regtested on x86_64-unknown-linux-gnu, Ok for trunk?

OK. Thanks for the patch! Nit: Could you check mathbuiltins.def - at 
least in the diff, "iround" seems to be misaligned (one " " missing).

Tobias

> 2012-03-15  Janne Blomqvist<jb@gcc.gnu.org>
>
>          * f95-lang.c (gfc_init_builtin_functions): Initialize
>          BUILT_IN_IROUND.
>          * mathbuiltins.def: Add IROUND.
>          * trans-intrinsic.c (build_round_expr): Use BUILT_IN_IROUND if
>          type size matches.
>          (gfc_build_intrinsic_lib_fndecls): Build iround functions.



More information about the Fortran mailing list