This is strange. With gfortran -2.500E-03 get printed two different ways
depending upon what is in the print list before it. g77 looks ok.

[dranta:~/tests/gfortran] dir% g77 -o print03 print03.f
[dranta:~/tests/gfortran] dir% print03
  -1.000E-02  -2.000E-02   1.000E-02   2.000E-02  -1.000E-03   0.500     
-2.500E-03  -2.000E-03
   1.000E-03   1.500E-03   2.500E-03   2.000E-03  -1.000E-03  -1.500E-03 
-2.500E-03  -2.000E-03
[dranta:~/tests/gfortran] dir% gfortran -o print03 print03.f
[dranta:~/tests/gfortran] dir% print03
  -1.000E-02  -2.000E-02   1.000E-02   2.000E-02  -1.000E-03   0.500     
-0.250E-02  -0.200E-02
   1.000E-03   1.500E-03   2.500E-03   2.000E-03  -1.000E-03  -1.500E-03 
-2.500E-03  -2.000E-03
STOP 0
[dranta:~/tests/gfortran] dir% cat print03.f
      program main
      dimension y(8)
      dimension x(8)
      data y/-.01,-.02,.01,.02,-0.100E-02,0.500,-0.250E-02,-0.200E-02/
      data x/0.100E-02,0.150E-02,0.250E-02,0.200E-02,
     .       -0.100E-02,-0.150E-02,-0.250E-02,-0.200E-02/
      write(6,2000)y
      write(6,2000)x
      stop
 2000 format (1p4G12.3,1p4G12.3)
      end

-- 
           Summary: gfortran - prints the same number with 1p4G12.3 two
                    different ways
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dir at lanl dot gov
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: powerpc-apple-darwin7.8.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20755

Reply via email to