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

Jürgen Reuter <juergen.reuter at desy dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |juergen.reuter at desy dot de

--- Comment #4 from Jürgen Reuter <juergen.reuter at desy dot de> ---
Is this code posted October 28 on c.l.f. another incarnation of the same
problem?
module third_party_library
  type foo
    integer, pointer :: f(:) => null()
  contains
    final :: foo_destroy
  end type
contains
  impure elemental subroutine foo_destroy(this)
    type(foo), intent(inout) :: this
    print *, "foo"
    if (associated(this%f)) deallocate(this%f)
  end subroutine
end module

module my_code
  use third_party_library
  type bar
    type(foo) :: b(2)
  end type
end module

program main
  use my_code
  type(bar) :: x
  call sub(x)
contains
  subroutine sub(x)
    type(bar), intent(out) :: x
  end subroutine
end program

Reply via email to