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

--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
With this modification it works:

  implicit none

  type string_t
    character(len=:), allocatable :: string_
  end type

  logical :: result

  result = .false.

  result = true(string())

  print *, result

contains

  type(string_t) function string()
    string%string_ = ""
  end function

  logical elemental function true(rhs)
    class(string_t), intent(in) :: rhs
    true = .true.
  end function

end

Reply via email to