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/42418] PROCEDURE: Rejects interface which is both specific and generic procedure
Date: Sun, 09 Jan 2011 19:07:00 -0000	[thread overview]
Message-ID: <bug-42418-4-TEzMh5i14T@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-42418-4@http.gcc.gnu.org/bugzilla/>

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.09 18:55:46
     Ever Confirmed|0                           |1

--- Comment #3 from janus at gcc dot gnu.org 2011-01-09 18:55:46 UTC ---
(In reply to comment #0)
> gfortran rejects the following program where "gen" is both a generic and a
> specific procedure name as interface argument to PROCEDURE. I cannot find a
> reason why it should be invalid and thus I think it is valid.
> 
> 
>     procedure(gen) :: f
>                  1
> Error: Interface 'gen' at (1) may not be generic


The behavior in comment #0 I can confirm. And I agree that it is valid. Chapter
16.3.1 of F08 says:

"Within its scope, a local identifier of one class shall not be the same as
another local identifier of the same class, except that a generic name may be
the same as the name of a procedure as explained in 12.4.3.4 [...]"

In 12.4.3.4.1 we find:

"A generic name is a generic identifier that refers to all of the procedure
names in the interface block. A generic name may be the same as any one of the
procedure names in the interface block, or the same as any accessible generic
name."


       reply	other threads:[~2011-01-09 18:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-42418-4@http.gcc.gnu.org/bugzilla/>
2011-01-09 19:07 ` janus at gcc dot gnu.org [this message]
2011-01-09 22:02 ` janus at gcc dot gnu.org
2012-01-28 23:17 ` dominiq at lps dot ens.fr
2012-07-21  9:52 ` janus at gcc dot gnu.org
2012-07-21 17:10 ` janus at gcc dot gnu.org
2012-07-31 18:33 ` janus at gcc dot gnu.org
2012-07-31 18:39 ` janus at gcc dot gnu.org
2009-12-17 22:51 [Bug fortran/42418] New: PROCEDURE: Rejects interfface " burnus at gcc dot gnu dot org
2009-12-17 23:02 ` [Bug fortran/42418] PROCEDURE: Rejects interface " burnus at gcc dot gnu dot org
2009-12-19 20:27 ` janus 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-42418-4-TEzMh5i14T@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).