https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66465

            Bug ID: 66465
           Summary: [4.9.2,5.1.0,6.0.0] procedure pointer component &
                    non-component interpreted as different type or kind
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: damian at sourceryinstitute dot org
  Target Milestone: ---

Gfortran 4.9.2, 5.1.0, and 6.0.0 each interpret a procedure pointer that is a
derived type component as having a different type or kind from a procedure
pointer that is of the same type and kind but is not a component:

$ cat procptr.f90 
  interface
     subroutine HandlerInterface
     end 
  end interface
  type TextHandlerTestCase
     procedure (HandlerInterface), nopass, pointer :: handlerOut=>null()
  end type 
  type(TextHandlerTestCase) this
  procedure (HandlerInterface), pointer :: procPtr=>null()
  print*, associated(procPtr, this%handlerOut)
end 

$ gfortran procptr.f90 
procptr.f90:10:30:

   print*, associated(procPtr, this%handlerOut)
                              1
Error: ‘target’ argument of ‘associated’ intrinsic at (1) must be the same type
and kind as ‘pointer’

$ gfortran --version
GNU Fortran (GCC) 6.0.0 20150607 (experimental)

Reply via email to