J3/06-374 Date: 16 November 2006 To: J3 From: Van Snyder Subject: Interpretation request concerning finalization NUMBER: F03/0085 TITLE: Finalizing targets of pointer or allocatable actual arguments KEYWORDS: Finalization, pointer actual argument, allocatable actual argument DEFECT TYPE: Erratum STATUS: QUESTION: Consider the program program Finalize type :: T ... contains final :: ... end type T type(t), pointer :: TV allocate ( TV ) call sub ( TV ) contains sub ( A ) type(t), intent(out) :: A end sub A end program Finalize The sixth paragraph of 4.5.5.2 [04-007:59:31-32] says "When a procedure is invoked, a nonpointer nonallocatable object that is an actual argument associated with an an INTENT(OUT) dummy argument is finalized.'' Is the target of TV finalized with SUB is invoked? If TV were allocatable instead of a pointer would it be finalized? ANSWER: It was intended that an allocatable actual argument or the target of a pointer actual argument that is associated with an INTENT(OUT) dummy argument is finalized with the procedure is invoked. Edits are provided to correct the error. EDITS: Replace the sixth paragraph of 4.5.5.2 [04-007:59:31-32] with the following: "When a procedure is invoked, an object that becomes argument associated with a nonpointer nonallocatable INTENT(OUT) dummy argument of that procedure is finalized." Or "An object that becomes argument associated with a nonpointer nonallocatable INTENT(OUT) dummy argument of a procedure is finalized when the procedure is invoked." Or "An object is finalized when it becomes argument associated with a nonpointer nonallocatable INTENT(OUT) dummy argument" SUBMITTED BY: Van Snyder HISTORY: Submitted m178