public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/34432] integer(kind=init_expression) function  is rejected
Date: Fri, 14 Dec 2007 14:00:00 -0000	[thread overview]
Message-ID: <20071214140004.15286.qmail@sourceware.org> (raw)
In-Reply-To: <bug-34432-13404@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from burnus at gcc dot gnu dot org  2007-12-14 14:00 -------
The problem for (...) expressions is:

In match_primary, several gfc_match_* are called, which all return MATCH_NO,
until  gfc_match_char ('('), which returns true. (So far so good.)

However, before "gfc_match_char" there is a call to gfc_match_rvalue.
gfc_match_rvalue calls gfc_match_name -- and the latter not only returns
MATCH_NO, but also issues

      if (gfc_error_flag_test() == 0)
        gfc_error ("Invalid character in name at %C");

which is at the heart of the problem. Without the call to gfc_error, the
program works.

The next question is how to solve this without breaking the diagnostics. I'd
assume this affects much more expressions than this one.

I was thinking of a flag (like "bool match_only"), which means that on needs to
audit all 37 uses of gfc_match_name.


-- 


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


  parent reply	other threads:[~2007-12-14 14:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-11 13:02 [Bug fortran/34432] New: " burnus at gcc dot gnu dot org
2007-12-11 13:04 ` [Bug fortran/34432] " jv244 at cam dot ac dot uk
2007-12-14  2:18 ` jvdelisle at gcc dot gnu dot org
2007-12-14 14:00 ` burnus at gcc dot gnu dot org [this message]
2007-12-16  7:07 ` jvdelisle at gcc dot gnu dot org
2008-01-12  8:49 ` jvdelisle at gcc dot gnu dot org
2008-01-12  9:43 ` jvdelisle at gcc dot gnu dot org
2008-01-12 10:50 ` jvdelisle 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=20071214140004.15286.qmail@sourceware.org \
    --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).