Looking at N1601.pdf, I see
R735 pointer-assignment-stmt is data-pointer-object [ (bounds-spec-
list) ] => data-target
or data-pointer-object (bounds-remapping-list ) => data-target
or proc-pointer-object => proc-target
And I see constraint C538:
"A pointer object that has the PROTECTED attribute and is accessed by
use association shall
not appear as (1) A pointer-object in a pointer-assignment-stmt..."
C538 doesn't forbid using a protected pointer as the target of a
pointer-assignment-stmt. But two (gfortran
4.4.0, Sun f90 8.3) out of
three compilers surveyed (ifort 10.1 is the third) disallow it. Am I
overlooking something? Thanks in advance.
%% cat p1.f90
module m
implicit none
integer, pointer, protected :: protected_pointer
end module m