This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Fortran] PR 34482: RFC and patch: BOZ to real/complex conversion for some systems
Tobias Burnus wrote:
Jerry DeLisle wrote:
Testing on ppc64 tonight after a rebuild. When I updated I see we
have been promoted to mpfr-2.3.0 which I now have to install locally
since the distro does not have it out yet.
Well, MPFR 2.3.0 is the new recommended version, but it should still be
buildable with 2.2.1:
+ dnl MPFR 2.2.1 is acceptable, but MPFR 2.3.0 is better.
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
choke me
Thus it really should work with 2.2.1, though MPFR 2.3.0 is nicer as it
supports, e.g., GAMMA and LOG_GAMMA simplification.
Jerry DeLisle wrote:
Tobias Burnus wrote:
Jerry, can you check that the patch does the right thing on such
platforms and real(z'00000000FFFFFFFF',kind=8) ?
Hmm, looking at the logs now I have 12575 failures. I will revert the
patch and see if I can get a working system here.
The patch itself should work on PPC; at least Dominique reported no
problems and John wrote in the PR: "Tested second version posted and it
fixes the fail on hppa-unknown-linux-gnu."
Tobias
OK, I got ppc64 working again.
The patch regression tests OK. However, with the following test program.
print *, real(z'FFFFFFFF', 4)
print *, transfer(4294967295_8, 0.0_4)
print '(z12)', transfer(real(z'FFFFFFFF',4), 1_4)
print *, transfer(2143289344_8, 0.0_4)
print '(z12)', transfer(real(z'7FC00000',4), 1_4)
print *, real(z'7FC00000',4)
print *, real(z'00000000ffffffff',8)
print *, real(z'FFFFFFFF00000000',8)
print *, real(z'3333')
END
On x86-64 I get:
$ gfc -fno-range-check nantest.f90
$ ./a.out
NaN
NaN
7FC00000
NaN
7FC00000
NaN
2.12199579096527232E-314
NaN
and on ppc64-linux:
$ gfc -fno-range-check nantest.f90
$ ./a.out
NaN
0.0000000
7FC00000
0.0000000
7FC00000
NaN
2.12199579096527232E-314
NaN
1.83668190E-41
Is there something wrong with 'transfer' ?
Jerry