public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tobias dot burnus at physik dot fu-berlin dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/29403]  New: print ('(a)') not working, print '(a) works
Date: Mon, 09 Oct 2006 16:32:00 -0000	[thread overview]
Message-ID: <bug-29403-1719@http.gcc.gnu.org/bugzilla/> (raw)

>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


             reply	other threads:[~2006-10-09 16:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-09 16:32 tobias dot burnus at physik dot fu-berlin dot de [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29403-1719@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).