[flang-commits] [flang] [flang][cuda] Preserve array lower bounds in implicit device-to-host transfer (PR #227824)
via flang-commits
flang-commits at lists.llvm.org
Thu Oct 1 06:11:07 PDT 2026
================
@@ -5694,9 +5557,32 @@ class FirConverter : public Fortran::lower::AbstractConverter {
else
temps.push_back(temp);
}
- addSymbol(sym,
- hlfir::translateToExtendedValue(loc, builder, temp).first,
- /*forced=*/true);
+
+ // Translate the temporary to an ExtendedValue and rebind it with
+ // the original lower bounds. fir::updateRuntimeLBounds covers all
+ // array representations (ArrayBoxValue, BoxValue, MutableBoxValue,
+ // CharArrayBoxValue) while preserving the temp's storage/extents and
+ // dropping the CUDA device data attribute.
----------------
jeanPerier wrote:
nit: same here, the first sentence is sufficient.
https://github.com/llvm/llvm-project/pull/227824
More information about the flang-commits
mailing list