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/70237] New: Incorrect 0.0 output with PF format


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70237

            Bug ID: 70237
           Summary: Incorrect 0.0 output with PF format
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: agardeux.ge at gmail dot com
  Target Milestone: ---

Consider the following formatted output using PF format:
    program zero_pf_fmt
        print '(a, -6PF8.3)', '-6PF8.3 0.0 = ', 0.0
    end program zero_pf_fmt


gfortran 4.9.3 gives an incorrect result (wrong number of digits):
-6PF8.3 0.0 = .0000000

Tested with:
   GNU Fortran (GCC) 4.9.3 <mingw32>

The output is correct with gfortran 4.4.7:
-6PF8.3 0.0 =    0.000

Tested with:
   GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)

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