This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Type-bound procedure and procedure pointer component calls


>>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]