Bug ID: 78013
           Summary: unexpected 'has no IMPLICIT type' error for a
                    type-bound function returning a procedure pointer
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot
          Reporter: pault at gcc dot
  Target Milestone: ---

Reported at!topic/comp.lang.fortran/OIEdfZunBPk

module m

   implicit none

   abstract interface
      function I_f() result( r )
         real :: r
      end function I_f
   end interface

   type, abstract :: a_t
      procedure(I_f), nopass, pointer :: m_f => null()
      procedure, pass(this), public :: f => get_f
   end type a_t


   function get_f( this ) result( f_ptr )

      class(a_t), intent(in)  :: this
      procedure(I_f), pointer :: f_ptr

      f_ptr => this%m_f

   end function get_f

end module m 

Upon compilation,
    function get_f( this ) result( f_ptr )
Error: Symbol 'get_f' at (1) has no IMPLICIT type

ifort compiles it without problem.

I have a fix, which is just regtesting.


Reply via email to