This is the mail archive of the 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/29625] New: Octal edit descriptors allow real variables, even with -std=f95

(Fortran version: GNU Fortran 95 (GCC) 4.2.0 20061015 (experimental))

Consider the following program:

~/temp/gfortran> cat trans1.f90
    program trans1
      real :: a
      a = 1.
      write (*,"(10x, f9.5)" ) a
      write (*,"( 1x,  o20)" ) transfer(a, 0)
      write (*,"( 1x,  o20)" ) a

According to the Fortran 95 standard (section, the output list item
corresponding to an "O" edit descriptor shall be of integer type.  Although
allowing real items is a perfectly reasonable extension when strict
standard-conformance is not requested, when strict standard conformance is
requested, the last of these write statements should produce an error. 
However, it does not:

~/temp/gfortran> gfortran -std=f95 -Wall trans1.f90 -o trans1.exe
~/temp/gfortran> ./trans1

           Summary: Octal edit descriptors allow real variables, even with -
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: minor
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: brooks at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin

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