public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45740]  New: PROCEDURE POINTER and PROTECTED: Accepts/ICEs on invalid code
@ 2010-09-21 12:32 burnus at gcc dot gnu dot org
  2010-09-21 13:47 ` [Bug fortran/45740] " burnus at gcc dot gnu dot org
  2010-09-21 14:20 ` burnus at gcc dot gnu dot org
  0 siblings, 2 replies; 10+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-09-21 12:32 UTC (permalink / raw)
  To: gcc-bugs

>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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-10-03 20:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-45740-4@http.gcc.gnu.org/bugzilla/>
2010-10-02 11:34 ` [Bug fortran/45740] PROCEDURE POINTER and PROTECTED: Accepts/ICEs on invalid code burnus at gcc dot gnu.org
2010-10-02 13:25 ` janus at gcc dot gnu.org
2010-10-02 14:19 ` janus at gcc dot gnu.org
2010-10-02 14:39 ` burnus at gcc dot gnu.org
2010-10-02 15:25 ` janus at gcc dot gnu.org
2010-10-02 18:51 ` janus at gcc dot gnu.org
2010-10-02 19:52 ` burnus at gcc dot gnu.org
2010-10-03 20:25 ` janus at gcc dot gnu.org
2010-09-21 12:32 [Bug fortran/45740] New: " burnus at gcc dot gnu dot org
2010-09-21 13:47 ` [Bug fortran/45740] " burnus at gcc dot gnu dot org
2010-09-21 14:20 ` burnus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).