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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.9/5/6 Regression] type   |[4.9/5/6 Regression] [OOP]
                   |bound procedure with pass   |type-bound procedure
                   |attribute, that returns a   |returning a procedure
                   |procedure pointer, fails to |pointer fails to compile
                   |compile                     |

--- Comment #7 from janus at gcc dot gnu.org ---
Two further observations:
1) The failure persists even if the type binding is named differently from the
actual function.
2) The argument 'f' does not need to be a PASS argument, it does not even need
to be a dummy argument at all, but some "class(functions)" variable must be
declared somewhere to trigger the error.


Test case modified accordingly:


module test
  implicit none

  type functions
  contains
    procedure, nopass :: get_pf => get_it
  end type

  class(functions), allocatable :: f

contains

  function get_it()
    procedure (real), pointer :: get_it
  end function

end module



The error actually concerns the function name, not the type binding:

   function get_it()
  1
Error: Symbol ‘get_it’ at (1) has no IMPLICIT type

Reply via email to