public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/45740] PROCEDURE POINTER and PROTECTED: Accepts/ICEs on invalid code
Date: Sat, 02 Oct 2010 15:25:00 -0000	[thread overview]
Message-ID: <20101002152500.jjO5KVLCJoDnoAKL0vwawQEsgFe9dwgL7fOW4yZ9ml4@z> (raw)
In-Reply-To: <bug-45740-4@http.gcc.gnu.org/bugzilla/>

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #7 from janus at gcc dot gnu.org 2010-10-02 15:25:04 UTC ---
(In reply to comment #6)
> I still do not see what is meant by the
> "proc-pointer" part in
> 
> "C551 A nonpointer object that has the PROTECTED attribute and is accessed by
> use association shall not appear [...] as the [...] proc-target in a
> pointer-assignment-stmt."
> 
> as PROTECTED can only be applied to proc pointers (and normal variables).

Ok, I think the only way this half-sentence and the interpretation on the J3
mailing list make sense, is via the following interpretation. Consider:

integer, pointer :: lhs, rhs
lhs => rhs

In such a pointer assignment statement, the object on the right hand side
supposedly does not have the pointer attribute (the pointer is dereferenced, so
that 'lhs' will point to the target of 'rhs'). With this reading, C551 can be
applied to (proc-/data-)pointer assignments as well, and the sentence about
'proc-target' does make sense.

[I hate these kinds of subtleties in reading the standard and hope I got it
right this time.]

Also, from a "common sense" POV, it is important to reject protected pointers
on the rhs of a pointer assignment, otherwise the PROTECTED feature could be
circumvented this way.


  parent reply	other threads:[~2010-10-02 15:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-45740-4@http.gcc.gnu.org/bugzilla/>
2010-10-02 11:34 ` burnus at gcc dot gnu.org
2010-10-02 13:25 ` janus at gcc dot gnu.org
2010-10-02 14:19 ` janus at gcc dot gnu.org
2010-10-02 14:39 ` burnus at gcc dot gnu.org
2010-10-02 15:25 ` janus at gcc dot gnu.org [this message]
2010-10-02 18:51 ` janus at gcc dot gnu.org
2010-10-02 19:52 ` burnus at gcc dot gnu.org
2010-10-03 20:25 ` janus at gcc dot gnu.org
2010-09-21 12:32 [Bug fortran/45740] New: " burnus at gcc dot gnu dot org
2010-09-21 13:47 ` [Bug fortran/45740] " burnus at gcc dot gnu dot org
2010-09-21 14:20 ` burnus 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=20101002152500.jjO5KVLCJoDnoAKL0vwawQEsgFe9dwgL7fOW4yZ9ml4@z \
    --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).