public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anlauf at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/54389] [F2003/F2008 difference] PURE functions and pointer dummy arguments / DECL_PURE_P issue
Date: Mon, 22 Apr 2024 19:45:11 +0000	[thread overview]
Message-ID: <bug-54389-4-b1S4S2aMVP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54389-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54389

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #7 from anlauf at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #6)
> Compiling the test in comment 0 still gives the error
> 
>      ptr = ptr + 1
>     1
> Error: Variable 'ptr' can not appear in a variable definition context
> (assignment) at (1) in PURE procedure
> 
> at revision r229078 (trunk 6.0).

That error looks correct to me.  NAG rejects the code as well for any INTENT.

To reconfirm: F2023 has

"C15104 In a pure subprogram any designator with a base object that [...]
is a pointer dummy argument of a pure function [...] shall not be used

(1) in a variable definition context"

There is no restriction on the INTENT of the pointer dummy.

See also Note 4, 2nd paragraph for reasoning supporting this.

Can we close this bug as fixed?

      parent reply	other threads:[~2024-04-22 19:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28  8:10 [Bug fortran/54389] New: [F2003/F2008 difference] PURE functions and pointer dummy arguments burnus at gcc dot gnu.org
2012-08-28  8:40 ` [Bug fortran/54389] [F2003/F2008 difference] PURE functions and pointer dummy arguments / DECL_PURE_P issue burnus at gcc dot gnu.org
2012-08-28 18:18 ` burnus at gcc dot gnu.org
2012-09-12 10:01 ` Joost.VandeVondele at mat dot ethz.ch
2012-09-12 10:30 ` burnus at gcc dot gnu.org
2012-09-13 19:49 ` burnus at gcc dot gnu.org
2015-10-20 14:14 ` dominiq at lps dot ens.fr
2024-04-22 19:45 ` anlauf at gcc dot gnu.org [this message]

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-54389-4-b1S4S2aMVP@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).