This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [4.5, Patch, Fortran] PR 36704: Procedure pointer as function result
- From: Janus Weil <jaydub66 at googlemail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: fortran at gcc dot gnu dot org
- Date: Thu, 9 Apr 2009 09:26:29 +0200
- Subject: Re: [4.5, Patch, Fortran] PR 36704: Procedure pointer as function result
- References: <20090409070120.GA5392@net-b.de>
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
>