This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [Patch, Fortran] PR 47042 - Reject statement functions w/ pointer attribute


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


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