[Bug fortran/37504] New: Wrongly rejects: unprotected_pointer => protected_pointer

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Sep 12 21:11:00 GMT 2008


Found at:
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/73c7b88ffbe8e1d5

The following (see URL above) is valid but gfortran rejects it with:
 Error: Pointer assignment target has PROTECTED attribute at (1)

> 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.

module m
  implicit none
  integer, pointer, protected :: protected_pointer
end module m

program p
  use m
  implicit none
  integer, pointer :: unprotected_pointer
  unprotected_pointer => protected_pointer
end program p


-- 
           Summary: Wrongly rejects: unprotected_pointer =>
                    protected_pointer
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          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=37504



More information about the Gcc-bugs mailing list