Files
clang-p2996/flang/lib/Optimizer/HLFIR
jeanPerier 1d4453a671 [flang][HLFIR] fix FORALL issue 120190 (#120236)
Fix #120190.

The hlfir.forall lowering code was not properly checking for forall
index reference in mask value computation before trying to hoist it: it
was only looking at the ops directly nested in the hlfir.forall_mask
region, but not the operation indirectly nested. This caused triggered
bogus hoisting in #120190 leading to undefined behavior (reference to
uinitialized data). The added regression test would die at compile time
with a dominance error.

Fix this by doing a deep walk of the region operation instead. Also
clean-up the region cloning to use without_terminator.
2024-12-18 10:26:04 +01:00
..