[Patch, Fortran] PR 44446 - Proc-pointer with PROTECTED
Tobias Burnus
burnus@net-b.de
Mon Jun 7 18:45:00 GMT 2010
Hi all,
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?
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: protected-procptr.diff
Type: text/x-patch
Size: 2289 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100607/91df81cc/attachment.bin>
More information about the Fortran
mailing list