This is the mail archive of the gcc-patches@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]

[PATCH] Enforce GMP/MPFR version requires and fix fortran/28276,27021


The attached patch has been tested on amd64-*-freebsd, and it
should only impact gfortran.  However, the patch does touch
the toplevel configure.in, and hence, configure.

markm, I cc'd you because of the pending branching of 4.2 and
the fact I touch configure.in.  If you prefer that I hold the
patch until after the branching, I can do so.

The patch causes configure to check that the version of 
GMP is 4.1 or newer and that MPFR is version 2.2.0 or
newer.  For older versions of GMP, configure will die.
For older versions of MPFR, configure simply checks that
any version of MPFR is available.  If no version of
MPFR is available, configure will die.  If an older version
of MPFR is found, it will be used; however, several known
problems with older MPFRs prevent the bug fixes for PR
fortran/28276 and fortran/27021 from functioning (ie.,
the old buggy gfortran code is still used).

This patch also removes the local hacks for handling subnormal
numbers and the folding of atan2().  Again, if an older version
of MPFR is found, the old buggy gfortran code is used.

2006-09-12  Steven G. Kargl  <kargl@gcc.gnu.org>

	* configure.in: Check for GMP 4.1 or newer.  Check for MPFR 2.2.0 
	or newer.
	* configure: Regenerated.
	* doc/install.texi: Document required versions of GMP and MPFR.
	* fortran/arith.c (arctangent2): Conditionally include code.
	(gfc_check_real_range): Use mpfr_subnormalize in preference to local
	hack.
	* fortran/simplify.c: Wrap Copyright to new line.
	(gfc_simplify_atan2): Use mpfr_atan2 in preference to arctangent2().
        (gfc_simplify_log): Ditto.


	PR fortran/28276
	* fortran/simplify.c (gfc_simplify_exponent): Use mpfr_get_exp in
	preference to broken local hack.
	* fortran/trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Append
	l for long double functions.

	PR fortran/27021
	* fortran/simplify.c (gfc_simplify_nearest): Use mpfr_nexttoward and
	mpfr_subnormalize to handle numbers near zero in preference to broken
	 local hack.

	PR fortran/28276
	* testsuite/gfortran.dg/exponent_1.f90: New test.

	PR fortran/27021
	* testsuite/gfortran.dg/nearest_1.f90: New test.

-- 
Steve

Attachment: new_mpfr.diff
Description: Text document


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