This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Type-bound procedure and procedure pointer component calls
- From: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- To: Daniel Kraft <d at domob dot eu>
- Cc: fortran at gcc dot gnu dot org, Janus Weil <jaydub66 at googlemail dot com>
- Date: Sun, 24 Aug 2008 21:27:14 +0200
- Subject: Re: Type-bound procedure and procedure pointer component calls
- References: <20080824184852.GA11487@physik.fu-berlin.de> <48B1B3B2.8040006@domob.eu>
Hello Daniel, hello Janus, hi all,
On Sun, Aug 24, 2008 at 09:17:06PM +0200, Daniel Kraft wrote:
> So do you agree with my proposal for gfc_callee?
Glancing at it: Yes. I have frankly not yet carefully read it since I
was/am struggling with another patch.
> I have to admit that I don't quite know what
>
> PROCEDURE(cos) :: foo
>
> above means.
procedure(interface) :: proc
declares an external procedure "proc" with the same interface as
"interface". The clue is that it also works (in principle) with
intrinsic (specific) procedures. Thus
intrinsic cos
procedure(cos) :: foo
should be identical to
intrinsic cos
interface
function foo(x)
real :: x ! Or: "real, intent(in) :: x"
end function foo
end interface
which is the same interface as defined in the Fortran standard for COS
(incl. the dummy argument name "x").
> Does this establish an explicit interface for foo? If so,
> foo's symbol's if_source is probably still not set to IFSRC_IFBODY. How
> do I know about this interface then, so I can adapt the check accordingly?
That's a question to Janus. In principle the two versions above should
behave identically. If they don't do so then there is a bug in Janus'
PROCEDURE implementation.
Tobias