This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35036] New: illegal E format descriptor produces wrong output
- From: "furue at hawaii dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jan 2008 01:13:10 -0000
- Subject: [Bug fortran/35036] New: illegal E format descriptor produces wrong output
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
"E8.0" is an illegal format descriptor, but g77 produces a wrong output
"0.1+01" for a value of 1e5, instead of a more sensible "********" .
$ cat tmp.f
a = 1.e5
write(*,'(E8.0)') a
end
$ g77 --version
GNU Fortran (GCC) 3.4.6 (Debian 3.4.6-6)
[. . .]
$ g77 tmp.f
$ ./a.out
0.1+01
$
OK, since the format descriptor is illegal, g77 has the right to produce
anything it likes, but producing a wrong output without warning is a poor
handling of the error.
Regards,
Ryo
--
Summary: illegal E format descriptor produces wrong output
Product: gcc
Version: 3.4.6
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: furue at hawaii dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35036