This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/35036] New: illegal E format descriptor produces wrong output


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]