public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/32841]  New: FAIL: gfortran.dg/edit_real_1.f90 on Darwin8
@ 2007-07-20 20:40 dominiq at lps dot ens dot fr
  2007-07-20 20:54 ` [Bug testsuite/32841] " jvdelisle at gcc dot gnu dot org
                   ` (33 more replies)
  0 siblings, 34 replies; 35+ messages in thread
From: dominiq at lps dot ens dot fr @ 2007-07-20 20:40 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2008-03-12 10:36 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-20 20:40 [Bug testsuite/32841] New: FAIL: gfortran.dg/edit_real_1.f90 on Darwin8 dominiq at lps dot ens dot fr
2007-07-20 20:54 ` [Bug testsuite/32841] " jvdelisle at gcc dot gnu dot org
2007-07-20 21:00 ` dominiq at lps dot ens dot fr
2007-07-20 21:01 ` jvdelisle at gcc dot gnu dot org
2007-07-20 21:20 ` dominiq at lps dot ens dot fr
2007-07-20 21:41 ` jvdelisle at gcc dot gnu dot org
2007-07-20 22:08 ` dominiq at lps dot ens dot fr
2007-07-20 22:21 ` jvdelisle at gcc dot gnu dot org
2007-07-20 22:28 ` dominiq at lps dot ens dot fr
2007-07-23 14:53 ` dominiq at lps dot ens dot fr
2007-07-23 15:03 ` dominiq at lps dot ens dot fr
2007-07-24  9:31 ` [Bug libfortran/32841] [4.3 regression libfortran] HUGE(1.0d0) is written a +Infinity " dominiq at lps dot ens dot fr
2007-07-25  4:45 ` [Bug libfortran/32841] [4.3 regression] " jvdelisle at gcc dot gnu dot org
2007-07-25  5:28 ` jvdelisle at gcc dot gnu dot org
2007-07-25  6:38 ` dominiq at lps dot ens dot fr
2007-07-25  6:41 ` dominiq at lps dot ens dot fr
2007-07-25 22:39 ` jvdelisle at gcc dot gnu dot org
2007-07-27  5:56 ` dominiq at lps dot ens dot fr
2007-07-27  6:50 ` [Bug libfortran/32841] [4.3 regression] HUGE(1.0d0) output as +Infinity on ppc-darwin8 fxcoudert at gcc dot gnu dot org
2007-07-27 19:34 ` dominiq at lps dot ens dot fr
2007-07-27 20:41 ` jvdelisle at gcc dot gnu dot org
2007-07-27 21:43 ` dominiq at lps dot ens dot fr
2007-07-27 23:46 ` fxcoudert at gcc dot gnu dot org
2007-08-31  1:15 ` pinskia at gcc dot gnu dot org
2007-09-05  1:30 ` mmitchel at gcc dot gnu dot org
2007-09-29 23:15 ` [Bug libfortran/32841] [4.3 regression] HUGE(1.0_16) " fxcoudert at gcc dot gnu dot org
2007-09-29 23:20 ` fxcoudert at gcc dot gnu dot org
2008-01-17 11:25 ` [Bug libfortran/32841] [4.3 regression] HUGE(1.0_16) output as +Infinity on ppc-darwin8 (gfortran.dg/large_real_kind_2.F90) burnus at gcc dot gnu dot org
2008-01-25 15:46 ` dominiq at lps dot ens dot fr
2008-02-21 13:50 ` [Bug libfortran/32841] [4.3/4.4 " fxcoudert at gcc dot gnu dot org
2008-02-24 12:00 ` fxcoudert at gcc dot gnu dot org
2008-02-24 12:03 ` fxcoudert at gcc dot gnu dot org
2008-02-24 12:10 ` fxcoudert at gcc dot gnu dot org
2008-02-25 13:47 ` dominiq at lps dot ens dot fr
2008-03-12 10:36 ` fxcoudert at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).