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/46990] [OOP] gfortran rejects passing a CLASS variable to TYPE
Date: Sat, 18 Dec 2010 17:09:00 -0000	[thread overview]
Message-ID: <bug-46990-4-Pgy0rcUXwV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-46990-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-18 17:08:49 UTC ---
(In reply to comment #5)
> The patch in comment #4 triggers two testsuite failures:
> 
> FAIL: gfortran.dg/dummy_procedure_4.f90  -O   (test for errors, line 28)
> FAIL: gfortran.dg/proc_ptr_30.f90  -O   (test for errors, line 25)
> 
> Both of them come from PR46067. I think they are actually valid Fortran and
> it's wrong to expect an error message.

I disagree. The first is about passing a procedure to a procedure dummy
argument, the second about associating a procedure with a proc-pointer - both
require that the characteristic is the same:

"7.2.2.4 Procedure pointer assignment"
"If the pointer object has an explicit interface, its characteristics shall be
the same as the pointer target except that the pointer target may be pure even
if the pointer object is not pure and the pointer target may be an elemental
intrinsic procedure even if the pointer object is not elemental. If the
characteristics of the pointer object or the pointer target are such that an
explicit interface is required, both the pointer object and the pointer target
shall have an explicit interface."

"12.5.2.9 Actual arguments associated with dummy procedure entities"
"If the interface of a dummy procedure is explicit, its characteristics as a
procedure (12.3.1) shall be the same as those of its e\vective argument, except
that a pure e\vective argument may be associated with a dummy argument that is
not pure and an elemental intrinsic actual procedure may be associated with a
dummy procedure (which cannot be elemental)."


Compare this with (cf. comment 0): "The dummy argument shall be type compatible
with the actual argument." -- which is less strict.


  parent reply	other threads:[~2010-12-18 17:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-17 10:34 [Bug fortran/46990] New: " burnus at gcc dot gnu.org
2010-12-17 20:44 ` [Bug fortran/46990] " janus at gcc dot gnu.org
2010-12-17 21:21 ` mikael at gcc dot gnu.org
2010-12-17 21:37 ` janus at gcc dot gnu.org
2010-12-17 22:04 ` janus at gcc dot gnu.org
2010-12-18 16:27 ` janus at gcc dot gnu.org
2010-12-18 17:09 ` burnus at gcc dot gnu.org [this message]
2011-02-01  9:27 ` burnus at gcc dot gnu.org
2011-12-11 20:48 ` pault at gcc dot gnu.org
2011-12-12  9:03 ` burnus 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-46990-4-Pgy0rcUXwV@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).