This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518

--- Comment #25 from Janne Blomqvist <jb at gcc dot gnu.org> 2012-05-05 07:59:30 UTC ---
Author: jb
Date: Sat May  5 07:59:22 2012
New Revision: 187191

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187191
Log:
PR 49010,24518 MOD/MODULO fixes.

gcc/fortran:

2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>

    PR fortran/49010
    PR fortran/24518
    * intrinsic.texi (MOD, MODULO): Mention sign and magnitude of result.
    * simplify.c (gfc_simplify_mod): Use mpfr_fmod.
    (gfc_simplify_modulo): Likewise, use copysign to fix the result if
    zero.
    * trans-intrinsic.c (gfc_conv_intrinsic_mod): Remove fallback as
    builtin_fmod is always available. For modulo, call copysign to fix
    the result when signed zeros are enabled.


testsuite:

2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>

    PR fortran/49010
    PR fortran/24518
    * gfortran.dg/mod_sign0_1.f90: New test.
    * gfortran.dg/mod_large_1.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/mod_large_1.f90
    trunk/gcc/testsuite/gfortran.dg/mod_sign0_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/simplify.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]