Skip to content
Unverified Commit bfcd0531 authored by jeanPerier's avatar jeanPerier Committed by GitHub
Browse files

[flang][hlfir] Do not emit extra declare for dummy used in BLOCK (#69184)

When a variable is used in a specification expression in a scope, it is
added to the list of variables that must be instantiated when lowering
the scope. When lowering a BLOCK, this caused instantiateVar to be
called again on all the host block variables appearing in block variable
specification expressions. This caused an extra declare to be emitted
for dummy inside block (for non dummy, instantiateVar is a no-op if the
symbol is already mapped).

Only call instantiateVar if the symbol is not mapped when lowering BLOCK
variables.
parent 77ab08e1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment