[Patch, Fortran] PR 44446 - Proc-pointer with PROTECTED

Janus Weil janus@gcc.gnu.org
Mon Jun 7 22:51:00 GMT 2010


> 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



More information about the Gcc-patches mailing list