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


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


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