[flang][hlfir] Propagate non-default lbounds from the mutable box.
The issue affected type select tests, such that inside the type guard block the associated variable was using default lbounds instead of inheriting it from the original variable. The bridge's `genExprBox` ended up creating BoxValue from a MutableBoxValue without setting non-default lbounds. So the hlfir.declare generated for the associated name inside the type guard block was also using the default lbounds. The fix is to read the value of the mutable box and propagate the lbounds to the new BoxValue. The fix might affect more than just select type cases. Reviewed By: tblah Differential Revision: https://reviews.llvm.org/D152413
Loading
Please sign in to comment