>From Fortran 2008: C549 An entity with the PROTECTED attribute shall be a procedure pointer or variable.
C551 A nonpointer object that has the PROTECTED attribute and is accessed by use association shall not appear in a variable definition context (16.6.7) or as the data-target or proc-target in a pointer-assignment-stmt. C552 A pointer that has the PROTECTED attribute and is accessed by use association shall not appear in a pointer association context (16.6.8). module m procedure(), pointer :: p, p2 protected :: p end module m subroutine one use m procedure(), pointer :: ptr1 => p ! Invalid end subroutine one subroutine two use m procedure(), pointer :: ptr2 ptr2 => p ! Invalid end subroutine two subroutine three use m procedure(), pointer :: ptr3 => p2 ! Valid call ptr3() ! ICE, related to PR 45290 ! internal compiler error: in record_reference, at cgraphbuild.c:60 end subroutine three -- Summary: PROCEDURE POINTER and PROTECTED: Accepts/ICEs on invalid code Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, accepts-invalid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45740