public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38285]  New: Wrong I/O output: Interaction between F and P for output
@ 2008-11-27  9:22 burnus at gcc dot gnu dot org
  2008-11-27  9:38 ` [Bug fortran/38285] " burnus at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-11-27  9:22 UTC (permalink / raw)
  To: gcc-bugs

Found on the J3 mailing list. gfortran is the compiler which prints "0.0"as
second number (4.1 to 4.4); ifort, g95, NAG f95, openf95 and sunf95 print the
3742 twice.

Van Snyder writes:
--------------------------------------------------------
The list items in subclause 10.8.5 "P editing" of 08-007r2 that begin
"On output,..." are silent concerning the effect of P editing on F
editing for output.  The specification of the effect of P on F during
output is hiding in the first list item, which begins "On input,...."

With the little program

        program F_and_P

          print 1, 3742.0, 0.3742
        1 format ( f14.0, 4pf14.0 )

        end program F_and_P

five of my six compilers produce a program that (correctly) prints
         3742.         3742.
while one (incorrectly) prints
         3742.         0000.

This treatment of F and P interaction goes back to F66 (7.2.3.5.1,
7.2.3.6.2), F77 (13.5.7.1, 13.5.9.2.1), and f90/95 (10.6.5, 10.5.1.2.1).

The effect of P on F output would be more clearly explained in a
separate list item, say between the second and third items.  I don't
think it's possible to rearrange the first list item both to be correct
and not to hide either the input or output effect.


-- 
           Summary: Wrong I/O output: Interaction between F and P for output
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38285


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

end of thread, other threads:[~2008-12-05  5:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-27  9:22 [Bug fortran/38285] New: Wrong I/O output: Interaction between F and P for output burnus at gcc dot gnu dot org
2008-11-27  9:38 ` [Bug fortran/38285] " burnus at gcc dot gnu dot org
2008-11-27 14:23 ` jvdelisle at gcc dot gnu dot org
2008-11-28 20:00 ` jvdelisle at gcc dot gnu dot org
2008-12-05  4:10 ` jvdelisle at gcc dot gnu dot org
2008-12-05  4:14 ` jvdelisle at gcc dot gnu dot org
2008-12-05  5:05 ` jvdelisle 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).