public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35036]  New: illegal E format descriptor produces wrong output
@ 2008-01-31  2:01 furue at hawaii dot edu
  2008-01-31  2:25 ` [Bug fortran/35036] " pinskia at gcc dot gnu dot org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: furue at hawaii dot edu @ 2008-01-31  2:01 UTC (permalink / raw)
  To: gcc-bugs

"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


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

end of thread, other threads:[~2008-02-21  2:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
2008-01-31  2:25 ` [Bug fortran/35036] " pinskia at gcc dot gnu dot org
2008-01-31  3:06 ` kargl at gcc dot gnu dot org
2008-01-31  3:10 ` furue at hawaii dot edu
2008-01-31  4:10 ` kargl at gcc dot gnu dot org
2008-01-31  4:44 ` furue at hawaii dot edu
2008-01-31  5:46 ` kargl at gcc dot gnu dot org
2008-01-31  6:55 ` jvdelisle at gcc dot gnu dot org
2008-01-31  6:56 ` furue at hawaii dot edu
2008-01-31  8:17 ` jvdelisle at gcc dot gnu dot org
2008-01-31 14:10 ` burnus at gcc dot gnu dot org
2008-02-02  8:28 ` jvdelisle at gcc dot gnu dot org
2008-02-02 11:14 ` dominiq at lps dot ens dot fr
2008-02-02 19:37 ` jvdelisle at gcc dot gnu dot org
2008-02-03  0:07 ` jvdelisle at gcc dot gnu dot org
2008-02-21  2:21 ` jvdelisle at gcc dot gnu dot org
2008-02-21  2:24 ` jvdelisle at gcc dot gnu dot org
2008-02-21  2:24 ` 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).