https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117539
--- Comment #2 from Dominik Gronkiewicz <gronki at gmail dot com> --- Thank you for a quick response! Actually, I do not agree. As explained better by this post and the one below: https://fortran-lang.discourse.group/t/pure-procedure-and-intent-out-polymorphic-pointer-argument/8830/12?u=gronki "In case of pointer arguments, intent applies to the association status and not the target. It’s surprising." and also "Given that the intent(out) applies to the association status of the pointer argument (not the status of the target) and deallocation is not performed automatically upon entry, the error might be to prohibit (or reduce the chance of) possible deallocation of polymorphic variables in the procedure body (because it might involve “impure” finalization via those polymorphic variables). But then, intent(inout), pointer for polymorphic pointer variables also has such a possibility (while it is not prohibited), I feel the error for intent(out), pointer seems strange..." Also private communications with one of the flang developers confirmed that indeed there is no implicit deallocation happening here, therefore no finalizers (pure or impure) for polymorphic targets are called. According to him, this is valid Fortran. Have a good day! Dominik