This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran] PR 44446 - Proc-pointer with PROTECTED
- From: Janus Weil <janus at gcc dot gnu dot org>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Tue, 8 Jun 2010 00:51:45 +0200
- Subject: Re: [Patch, Fortran] PR 44446 - Proc-pointer with PROTECTED
- References: <4C0D3E1E.7090103@net-b.de>
> as Marco Restelli reported, the gfortran currently rejects a
> procedure-pointer in the declaration part of a module if it has the
> PROTECTED attribute. The protected <-> external/procedure check makes
> sense, but not for procedure pointers.
>
> As gfortran sets the EXTERNAL and PROCEDURE attribute for the PROCEDURE
> statement and as one can write it as
> ?PROCEDURE(), PROTECTED :: foo
> ! which invalid by itself, but valid with the following line
> ?POINTER :: foo
> the attribute check cannot be done in decl.c/symbol.c and thus I have
> moved it to resolve.c.
>
> Build and regtested on x86-64-linux.
> OK for the trunk?
Ok. Thanks for the patch.
Cheers,
Janus