This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/25425] New: F95 and F2003 differ on list-directed output for 0.0
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Dec 2005 09:13:20 -0000
- Subject: [Bug libfortran/25425] New: F95 and F2003 differ on list-directed output for 0.0
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
It seems that, according to F95, list-directed formatting of zero must behave
as if formatted with the E descriptor (0.0E+00) while F2003 requires an F
format behaviour (0.0). See message
<1134632379.672465.126120@z14g2000cwz.googlegroups.com> on comp.lang.fortran
("writing formatted zeros with implicit formats", by robert.corbett@sun.com).
We currently implement the F2003 behaviour, independently of the -std flag.
$ cat a.f
PROGRAM MAIN
PRINT *, -2.1, -1.2, 0.0, 1.1, 2.2
END
$ gfortran a.f && ./a.out
-2.100000 -1.200000 0.000000 1.100000 2.200000
$ ifort a.f && ./a.out
-2.100000 -1.200000 0.0000000E+00 1.100000 2.200000
--
Summary: F95 and F2003 differ on list-directed output for 0.0
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25425