[Patch,Fortran] PR46122 Make PROTECT check less strict

Tobias Burnus burnus@net-b.de
Sat Oct 23 12:56:00 GMT 2010


Currently, GCC rejects

   protected_pointer%pointer%var = 5

as the "protected_pointer" is protected. However, that only protects the 
pointer association status - but the example does not modify it - only 
the target of the pointer is modified, which is valid.

The solution is to do the same as with INTENT: Don't continue checking 
as soon as there is component-ref with a pointer component involved 
(which is not the last component-ref).

Build and currently regtesting on x86-64-linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: protected-fix.diff
Type: text/x-patch
Size: 1971 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20101023/7f6e25ac/attachment.bin>


More information about the Fortran mailing list