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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |janus at gcc dot gnu.org

--- Comment #5 from janus at gcc dot gnu.org ---
(In reply to janus from comment #3)
> This draft patch gets rid of the error and regtests cleanly:

Unfortunately this patch is far from complete. What needs to be done is to use
the PPC component of the vtab in the actual-argument expression.

There are two cases to be handled: Polymorphic and non-polymorphic variables.

Here is a test case without CO_REDUCE, which covers both cases:


module m
  type t
  contains
    procedure, nopass :: tbp => f
  end type
contains
  pure integer function f(a,b)
    integer, intent(in) :: a,b
    f = a+b
  end function
end module

use m
integer :: a
class(t), allocatable :: x
type(t) :: y

call sub(x%tbp)
call sub(y%tbp)

contains
  subroutine sub(arg)
    procedure(f) :: arg
    print *,f(1,2)
  end subroutine
end


I'm working on a patch.

Reply via email to