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
* [Bug fortran/38285] Wrong I/O output: Interaction between F and P for output
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 ` burnus at gcc dot gnu dot org
2008-11-27 14:23 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-11-27 9:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2008-11-27 09:37 -------
This is a regression with regards to g77.
The email itself (for completeness):
http://j3-fortran.org/pipermail/j3/2008-November/002084.html
The problem only occurs for a d (Fw.d) of "0", for, e.g., "4PF14.1" gfortran
and the other compilers print: "3742.0".
Thus, I think the problem is the special case for abs(internal number) < 0
together with Fw.d with d == 0.
>From the F2003 standard: "10.7.5 P editing"
"The kP edit descriptor temporarily changes (9.4.1) the scale factor for the
connection to k. The scale factor affects the editing of F, E, EN, ES, D, and G
edit descriptors for numeric quantities."
[...]
"(1) On [...] F output editing, the scale factor effect is that the externally
represented number equals the internally represented number multiplied by
10^k."
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.1.3 4.2.1 4.3.2 4.4.0
Known to work| |3.4.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38285
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/38285] Wrong I/O output: Interaction between F and P for output
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
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-11-27 14:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2008-11-27 14:21 -------
I will see what I can do.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-11-27 14:21:54
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38285
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/38285] Wrong I/O output: Interaction between F and P for output
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
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-11-28 20:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2008-11-28 19:58 -------
*** Bug 38305 has been marked as a duplicate of this bug. ***
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fkrogh#gcc at mathalacarte
| |dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38285
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/38285] Wrong I/O output: Interaction between F and P for output
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
` (2 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-12-05 4:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2008-12-05 04:09 -------
Subject: Bug 38285
Author: jvdelisle
Date: Fri Dec 5 04:07:45 2008
New Revision: 142455
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142455
Log:
2008-12-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/38285
* write_float.def (WRITE_FLOAT): Zero the float value for special case
only if scale_factor = 0.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/write_float.def
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38285
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/38285] Wrong I/O output: Interaction between F and P for output
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
` (3 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-12-05 4:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2008-12-05 04:12 -------
Subject: Bug 38285
Author: jvdelisle
Date: Fri Dec 5 04:11:28 2008
New Revision: 142456
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142456
Log:
2008-12-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/38285
gfortran.dg/fmt_f_an_p.f: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/fmt_f_an_p.f
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38285
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/38285] Wrong I/O output: Interaction between F and P for output
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
` (4 preceding siblings ...)
2008-12-05 4:14 ` jvdelisle at gcc dot gnu dot org
@ 2008-12-05 5:05 ` jvdelisle at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-12-05 5:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2008-12-05 05:03 -------
Fixed on trunk.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
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).