This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated


The following program fails with:

    procedure(sub), pointer :: pptr2
                                    1
Error: Interface 'sub' of procedure 'pptr2' at (1) must be explicit


The question is whether it is valid or not. As both NAG f95 and ifort reject it
(g95 accepts it), it might be invalid.


However, if one uncomments pptr1: gfortran, NAG f95 and g95 accept pptr1 and
pptr2 -- while ifort continues to reject pptr2 only. Thus it might be valid at
the end.


program main
!  procedure(sub), pointer :: pptr1
!  nullify (pptr1)
contains
  subroutine test()
    procedure(sub), pointer :: pptr2
    nullify (pptr2)
  end subroutine test
  subroutine sub()
  end subroutine sub
end program main


-- 
           Summary: Procedure(interface): Rejected if interface is
                    indirectly hostassociated
           Product: gcc
           Version: 4.5.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=40591


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]