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: [4.5, Patch, Fortran] PR 36704: Procedure pointer as function result


2009/4/9 Tobias Burnus <burnus@net-b.de>:
>
> I'm not sure how easily this can be fixed, but the error message is
> a bit strange for a naive reader. In any case this can be fixed
> after committing the big patch.
>
> ?real f
> ? ? ? ?1
> Error: Symbol 'ppr@' at (1) cannot have a type

Yeah, this problem already appeared for other test cases (see an
earlier review by Mikael in this thread). It is a consequence of the
fact that I use a 'hidden' result variable called 'ppr@'. One could of
course fix this by adding some special case code for each possible
error message. But there are probably lots of different error messages
which one would have to take care of, which is why I hesitate a bit to
do this. I'd be happy if someone has a clever idea on how to handle
this (the hidden result variable must of course have a different name
than the actual function).

Cheers,
Janus



> function f()
> ?external bar
> ?interface
> ? ?subroutine f()
> ? ?end subroutine f
> ?end interface
> ?pointer f
> ?real f
> end function f
>
>
> Tobias
>


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