[flang] Don't emit spurious error for polymorphic actual argument in PURE
Definability checking is unconditionally flagging the use of a polymorphic variable as an actual argument for a procedure reference in a PURE subprogram unless the corresponding dummy is INTENT(IN). This isn't necessary, since an INTENT(OUT) polymorphic dummy is already caught as an error in the definition of the callee, which must also be PURE; and an INTENT(IN OUT) or intent-free dummy is allowed to be passed a polymorphic actual in a PURE context, with any attempt to deallocate it being caught in the callee. So add a flag to the definability checker to disable the "polymorphic definition in PURE context" check when using it to check actual arguments. Differential Revision: https://reviews.llvm.org/D139044
Loading
Please sign in to comment