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: "Janus Weil" <jaydub66 at googlemail dot com>
- To: "Daniel Kraft" <d at domob dot eu>
- Cc: fortran at gcc dot gnu dot org
- Date: Mon, 25 Aug 2008 20:31:37 +0200
- Subject: Re: Type-bound procedure and procedure pointer component calls
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=vyg6ZiynthkvH4Mc7yS5oQyWt6BxEpiEFSZUTb74Y6E=; b=oxu1mYPaAXJg/rMuSoDsBzmkVLx60ek1Vi9/+YXpiy01f2b3YTnvOIoX4GGzaFbMpu NiThhyXD5yB71SII60+qdl0zkQNrgwT3ugqYehNzw6xNtY58OKfIy67o1YQCTpW8ZpW7 wN9LmJRjYba67ZdBPeqCm6FIWWqmZZ4OiPV3w=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hdCtR1IF6m3JLsJoafpqvN8xjJiHsI/fRQ2yYgy8VqehrzdEHuuuyffmPoHew2IH1/ NiVVSme7GkN3PwvdUczrFxWmlC0jU60v+dSLVtCuqgIVJik52R0K6eXDqIiYsKpEX901 8Ea2/D6akhKHXS1W/wPj72Z4vegaBP/nvchF8=
- References: <20080824184852.GA11487@physik.fu-berlin.de> <48B1B3B2.8040006@domob.eu> <20080824192521.GA12263@physik.fu-berlin.de> <48B1B841.6080401@domob.eu>
>>> 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.
>
> Probably I'm doing something wrong in the type-bound procedures patch, but
> with the extensive version above I only get the not-yet-implemented error,
> with the PROCEDURE version I also get the "must be a module procedure or
> explicit interface" error, so those two can't be totally equivalent at least
> as far as gfc's internals are concerned.
>
> Janus, how do I know a symtree got an interface through PROCEDURE?
You can tell this from the "ts.interface" field. This field will point
to the symbol from which the interface is inherited. For
PROCEDURE(foo) :: bar
the sym->ts.interface of "bar" will point to the symbol of "foo". If
no interface is given it is empty. At resolution time the interface of
"foo" (including formal arguments, some attributes etc) is copied to
"bar" (see resolve_symbol).
Hope this answers your question,
Janus