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/60507] Passing function call into procedure argument not caught
Date: Thu, 13 Mar 2014 20:12:00 -0000	[thread overview]
Message-ID: <bug-60507-4-X2BLuGRSYZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-60507-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from janus at gcc dot gnu.org ---
The patch in comment #2 ICEs on this extended test case:


type :: t
  procedure(g), pointer, nopass :: ppc => g
end type
procedure(g), pointer :: pp => g
type(t)::x

print *, f(g)        ! ok
print *, f(g())      ! illegal
print *, f(pp)       ! ok
print *, f(pp())     ! illegal
print *, f(x%ppc)    ! ok
print *, f(x%ppc())  ! illegal

contains

  real function f(fun) 
    procedure(g) :: fun
    f = fun()
  end function

  real function g()
    g = 1.
  end function

end


  parent reply	other threads:[~2014-03-13 20:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12  8:52 [Bug fortran/60507] New: Passing real expression " vladimir.fuka at gmail dot com
2014-03-12 13:47 ` [Bug fortran/60507] " janus at gcc dot gnu.org
2014-03-12 16:46 ` [Bug fortran/60507] Passing function call " janus at gcc dot gnu.org
2014-03-13 20:12 ` janus at gcc dot gnu.org [this message]
2014-03-18 15:33 ` janus at gcc dot gnu.org
2014-12-26 13:42 ` dominiq at lps dot ens.fr
2014-12-29 12:12 ` janus at gcc dot gnu.org
2015-01-02 11:25 ` janus 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-60507-4-X2BLuGRSYZ@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).