Pure procedure and intent(out) polymorphic pointer argument

Can you give an example of how a type would be lost? I absolutely do not understand that reasoning. How a type would be “lost” (it would not be) and invalidate other variables (it would not?)

The more we discuss the more I think I am right.

Funnily enough, gfortran 13 does not say a word about explicit deallocation, which should be forbidden (the finalizer can be invoked).

module bugmod

   implicit none

   type value_t
   end type

contains

   pure subroutine reset_ptr(ptr)
      class(value_t), intent(inout), pointer :: ptr

      nullify(ptr)
   end subroutine

   pure subroutine dealloc_ptr(ptr)
      class(value_t), intent(inout), pointer :: ptr
      ! hey, here we might call an impure finalizer
      ! but no word from gfortran
      deallocate(ptr)
   end subroutine

end module