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/29403] New: print ('(a)') not working, print '(a) works


gfortran shows:

print ('(z20.8)'), i
Error: Syntax error in PRINT statement at (1)

The (optional) parentheses are allow (see below) and it works in ifort, NAG f95
and g95.

>From Fortran 2003 standard Section 9.5 and

R911  write-stmt   is  WRITE (io-control-spec-list) [output-item list]
R912  print-stmt   is  PRINT format[, output-item-list]

where "format" is:

R914  format       is  default-char-expr
                   or  label
                   or  *

Note that "default-char-expr" is:
R726 default-char-expr is expr
C707 (R726) default-char-expr shall be of type default character.

If one goes through all the "expr", "level-5-expr", ... one ends up at

R701 primary is constant
 or ( expr )

In other words: A default-char-expr may have parentheses around.

           Summary: print ('(a)') not working, print '(a) works
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tobias dot burnus at physik dot fu-berlin dot de

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