regressions?

Steve Kargl sgk@troutmask.apl.washington.edu
Wed Oct 4 20:52:00 GMT 2006


On Wed, Oct 04, 2006 at 01:42:48PM -0700, Steve Kargl wrote:
> On Wed, Oct 04, 2006 at 10:32:27PM +0200, Dominique Dhumieres wrote:
> > Steve,
> > 
> > With your patch I get for the following code:
> > 
> > program gfcbug36
> >   implicit none
> >   real, parameter :: one = 1.0
> >   real :: a = one
> > 
> >   print *, fraction(1.0), exponent(1.0), scale(fraction(1.0), exponent(1.0))
> >   print *, fraction(a), exponent(a), scale(fraction(a), exponent(a))
> > 
> > end program gfcbug36
> > 
> >   0.5000000               1   1.000000    
> >    0.000000               0   0.000000    
> > 
> > Any idea?
> 
> Hmmm, you do have mpfr 2.2.0, right?  Check the mpfr.h
> file for version info.
> 
> troutmask:sgk[207] ./z
>   0.5000000               1   1.000000    
>   0.5000000               1   1.000000    
> 

What does -fdump-tree-original show?  It should contain something
like

      D.1250 = _gfortran_fraction_r4 (a);
      _gfortran_transfer_real (&dt_parm.1, &D.1250, 4);
    }
    {
      int4 D.1251;

      D.1251 = _gfortran_exponent_r4 (a);

These functions use libm's frexp to get the fraction and exponent.
frexp may be expanded into a GCC builtin function or it could be
from libm.  Either case, frexp appears to be broken.


-- 
Steve



More information about the Fortran mailing list