This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR 47042 - Reject statement functions w/ pointer attribute
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 30 Jan 2011 10:11:58 -0800
- Subject: Re: [Patch, Fortran] PR 47042 - Reject statement functions w/ pointer attribute
- References: <4D45A450.9020505@net-b.de>
On Sun, Jan 30, 2011 at 06:48:00PM +0100, Tobias Burnus wrote:
> Statement functions with pointer or allocatable attribute seem to be
> invalid - thus, reject them.
>
> Build and regtested on x86-64-linux.
> OK for the trunk?
>
> Tobias
>
> PS: gfortran, g95 and pgf95 did accept statement function with pointer
> attribute (cf. example in the PR) - though it is rather unclear how they
> could be handled. Other compilers (pathscale, NAG, ifort) reject them -
> and F77 did not support POINTER thus I think one can reject it
> unconditionally.
OK.
I agree with Nick. A statement function has an implicit interface.
A procedure that returns a pointer or allocatable must have an
explicit interface. Yes, I know there is the "other than a
statement function" clause in 12.4.2.2 "Explicit interface".
Thanks for the patch.
--
Steve