This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug testsuite/32841] New: FAIL: gfortran.dg/edit_real_1.f90 on Darwin8
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jul 2007 20:40:10 -0000
- Subject: [Bug testsuite/32841] New: FAIL: gfortran.dg/edit_real_1.f90 on Darwin8
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Copy of http://gcc.gnu.org/ml/fortran/2007-07/msg00388.html
I have finally decided to give a shot to OSX 10.4 on my G5 and I do
see the edit_real_1.f90 failure. The culprit is:
write (s, '(1PE10.3,A)') huge(0d0), "z"
The follwoing reduced code:
! { dg-do run }
! Check real value edit descriptors
! Also checks that rounding is performed correctly
program edit_real_1
character(len=20) s
character(len=20) x
parameter (x = "xxxxxxxxxxxxxxxxxxxx")
print *, huge(0d0), nearest(huge(0d0), -1.0d0)
print '(2(1PG30.18))', huge(0d0), nearest(huge(0d0), -1.0d0)
s = x
write (s, '(1PG10.3,A)') huge(0d0), "z"
print *, s
! E format, very large number.
! Used to overflow with positive scale factor
s = x
write (s, '(1PE10.3,A)') huge(0d0), "z"
print *, s
! The actual value is target specific, so just do a basic check
if ((s(1:1) .eq. "*") .or. (s(7:7) .ne. "+") .or. &
(s(11:11) .ne. "z")) call abort
end
gives under OSX 10.3:
1.797693134862316E+308 1.797693134862316E+308
1.797693134862315708+308 1.797693134862315509+308
1.798+308z
1.798+308z
while it gives under 10.4:
+Infinity 1.797693134862316E+308
+Infinity 1.797693134862315509+308
+Infinityz
+Infinityz
Abort
One can argue that huge(0d0) rounded to three digits is +Infinity,
but I think it is a bug to get +Infinity with the 18 digit precision.
Any idea on how to trace the problem?
Dominique
BTW when I said under OSX 10.3, it was not accurate, I meant
gfortran 4.3 compiled under 10.3, but run under 10.4
Following mails:
http://gcc.gnu.org/ml/fortran/2007-07/msg00393.html
http://gcc.gnu.org/ml/fortran/2007-07/msg00399.html
http://gcc.gnu.org/ml/fortran/2007-07/msg00400.html
--
Summary: FAIL: gfortran.dg/edit_real_1.f90 on Darwin8
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
GCC target triplet: powerpc-apple-darwin8
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32841