public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29403]  New: print ('(a)') not working, print '(a) works
@ 2006-10-09 16:32 tobias dot burnus at physik dot fu-berlin dot de
  2006-10-14  4:49 ` [Bug fortran/29403] " kargl at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-10-09 16:32 UTC (permalink / raw)
  To: gcc-bugs

>From http://gcc.gnu.org/ml/fortran/2006-10/msg00274.html

gfortran shows:

print ('(z20.8)'), i
      1
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 9.5.1.1:

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


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-10-16 19:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-09 16:32 [Bug fortran/29403] New: print ('(a)') not working, print '(a) works tobias dot burnus at physik dot fu-berlin dot de
2006-10-14  4:49 ` [Bug fortran/29403] " kargl at gcc dot gnu dot org
2006-10-16  0:52 ` kargl at gcc dot gnu dot org
2006-10-16  0:54 ` kargl at gcc dot gnu dot org
2006-10-16 16:58 ` [Bug fortran/29403] [4.1 only] " kargl at gcc dot gnu dot org
2006-10-16 18:37 ` kargl at gcc dot gnu dot org
2006-10-16 19:18 ` kargl at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).