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/63552] [OOP] Type-bound procedures rejected as actual argument to dummy procedure
Date: Fri, 02 Jan 2015 21:26:00 -0000 [thread overview]
Message-ID: <bug-63552-4-oqjZsoDuCI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-63552-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63552
--- Comment #4 from janus at gcc dot gnu.org ---
(In reply to janus from comment #3)
> For the commented-out line I get:
>
> call co_reduce(a,x%ppc)
> 1 2
> Fehler: A argument at (1) has type INTEGER(4) but the function passed as
> OPERATOR at (2) returns REAL(4)
>
> (which I guess is diagnosed correctly?)
Thus the test case is invalid. Here is a corrected version:
module m
type t
procedure(f), pointer, nopass :: ppc
contains
procedure, nopass :: tbp => f
end type
contains
pure integer function f(a,b)
integer, intent(in) :: a,b
f = 0
end function
end module
use m
integer :: a
type(t) :: x
! call co_reduce(a,f)
! call co_reduce(a,x%ppc)
call co_reduce(a,x%tbp)
end
next prev parent reply other threads:[~2015-01-02 21:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 5:07 [Bug fortran/63552] New: " burnus at gcc dot gnu.org
2014-10-16 10:10 ` [Bug fortran/63552] " dominiq at lps dot ens.fr
2014-12-29 13:21 ` janus at gcc dot gnu.org
2014-12-29 14:02 ` janus at gcc dot gnu.org
2015-01-02 21:26 ` janus at gcc dot gnu.org [this message]
2015-01-03 0:03 ` janus at gcc dot gnu.org
2015-01-03 22:06 ` burnus at gcc dot gnu.org
2015-01-03 23:09 ` ian_harvey at bigpond dot com
2015-01-04 10:47 ` 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-63552-4-oqjZsoDuCI@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).