Dinistro wrote: Can you elaborate on why the variable's scope is not already set accordingly by flang? I assume that there is some reason for this, but I'm not familiar enough with flang to know this detail. https://github.com/llvm/llvm-project/pull/91604