public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/48478] Array-constructor with type-spec: reject valid/accept invalid
Date: Wed, 06 Apr 2011 13:20:00 -0000	[thread overview]
Message-ID: <bug-48478-4-jAMLhi1VOF@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48478-4@http.gcc.gnu.org/bugzilla/>

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |accepts-invalid,
                   |                            |rejects-valid
   Last reconfirmed|                            |2011.04.06 13:20:35
                 CC|                            |burnus at gcc dot gnu.org
     Ever Confirmed|0                           |1
            Summary|Valid array-constructor     |Array-constructor with
                   |syntax rejected/invalid     |type-spec: reject
                   |accepted                    |valid/accept invalid

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-04-06 13:20:35 UTC ---
Confirmed.

I first thought that it used to work properly (I cannot check at the moment),
but I now think that I mixed it up with "ALLOCATE ( type-spec :: ...)" which
has the the same syntax. Thus, the fix should be trivial: To use the same as
for allocate.

match.c's gfc_match_allocate has:

  m = match_type_spec (&ts);

While array.c's gfc_match_array_constructor uses:

 if (gfc_match_decl_type_spec (&ts, 0) == MATCH_YES)

(One should make sure that the array constructor also works in initialization
expressions, it might use a different code path.)


  reply	other threads:[~2011-04-06 13:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06 11:51 [Bug fortran/48478] New: Valid array-constructor syntax rejected/invalid accepted ian_harvey at bigpond dot com
2011-04-06 13:20 ` burnus at gcc dot gnu.org [this message]
2015-02-25 10:35 ` [Bug fortran/48478] Array-constructor with type-spec: reject valid/accept invalid fxcoudert at gcc dot gnu.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-48478-4-jAMLhi1VOF@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).