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]

Re: [PATCH] Require GMP 4.2 and MPFR 2.2


On Sun, Apr 16, 2006 at 11:31:35AM +0200, Gerald Pfeifer wrote:
> On Sat, 15 Apr 2006, Steve Kargl wrote:
> > 2006-04-15  Steven G. Kargl  <kargls@comcast.net>
> > 
> > 	* configure.in:  Required versions of GMP and MPFR are 4.2 and 
> > 	2.2, respectively.
> 
> You being a FreeBSD user, I'll point out that the FreeBSD port of
> math/libgmp4 was updated to version 4.2 less than two weeks ago and
> in fact GMP 4.2 was released only about three weeks ago.

True enough.  The main requirement will be the use of mpfr 2.2.0,
and its last ChangeLog entry is dated 2005-09-18.  In reading the
mpfr web site, it states that mpfr needs gmp 4.1 or higher version.
If you check the gmp 4.1 tree, you'll find the very old and very
broken version of mpfr.  Unfortunately, the check for MPFR_VERSION
will find the old version, the build will fail.

> 
> Should we really have external dependencies which are as fresh?
>

The patch would be applied only to mainline.

> 
> (And if we have such strict requirements, wouldn't it make sense to
> have these in our tree?)
> 

I don't view it as a strict requirement.  It is a requirement for
functionality.  I'm the person who write fortran/arith.c:390-419.
I can assure you that gfortran would be much better served by

+  /* Save current values of emin and emax.  */
+  emin = mpfr_get_emin ();
+  emax = mpfr_get_emax ();
+  /* Set emin and emax for the current model number.  */
+  mpfr_set_emin ((mp_exp_t) gfc_real_kinds[sgn].min_exponent - 1);
+  mpfr_set_emax ((mp_exp_t) gfc_real_kinds[sgn].max_exponent - 1);
+  mpfr_subnormalize (result->value.real, 0, GFC_RND_MODE);
+  mpfr_set_emin (emin);
+  mpfr_set_emax (emax);

Not to mention, the mpfr_subnormalize can be used to fix a 
bug in simplify.c(gfc_simplify_nearest).

-- 
Steve


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