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: RFC: Function pointer to internal function [fwd: tobias.burnus@physik.fu-berlin.de]


I accidently only replied to Jakub.

Daniel plans to submit a patch for it in a couple of hours :-)

Tobias

----- Forwarded message -----

Date: Fri, 3 Sep 2010 11:00:59 +0200
From: Tobias Burnus <tobias.burnus@physik.fu-berlin.de>
To: Jakub Jelinek <jakub@redhat.com>
Subject: Re: RFC: Function pointer to internal function

On Fri, Sep 03, 2010 at 10:47:38AM +0200, Jakub Jelinek wrote:
> ??  It just works.  But I don't think that testcase is exactly what you want
> to try, because eventhough your internal is nested function, it isn't
> touching parent vars at all, thus can be compiled like ordinary static
> functions.

Well, I wanted to illustrate what the Fortran standard meant; accessing the
parent's variables is of course the more complicated case.

> which works too (on most architectures by creating a trampoline).
> So, on the Fortran side, just pass around address of the nested function
> and tree-nested.c should take care of the rest.

Good to know. Thus, implementing it essentially means to change some
checks - and writing a few test cases. Had we known this earlier, gfortran
had implemented it already a couple of years ago ...

Sounds like a 1/2h job :-)

Thanks Jakub!

Tobias


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