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

--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
A problem related to the original arises in compiling
fiats(test/trainable_network_test_m.F90). This time, rather than use only it is
import that does not pick up the specific pdt.

module tensor_m
  implicit none

  type tensor_t(k)
    integer, kind :: k = kind(0.)
    real(k), allocatable :: value_
  end type

  interface
    function myfunc (arg)
      import tensor_t                ! 'import, all' works
      implicit none
      type (tensor_t) myfunc
      type (tensor_t), intent(in) :: arg
    end function
  end interface

contains
  function y(x)
    type(tensor_t) x, y
    y = tensor_t(x%value_)
  end function
end module

  use tensor_m, only : tensor_t, y   ! Original fault
  implicit none
  type(tensor_t) desired_output
  desired_output = y(tensor_t(0.))
end

Reply via email to