[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:08 PDT 2026
================
@@ -5685,6 +5539,15 @@ class FirConverter : public Fortran::lower::AbstractConverter {
baseValue = addr;
hlfir::Entity entity{baseValue};
+
+ // Obtain the original lower bounds before creating the temporary.
+ // getNonDefaultLowerBounds handles all cases including
+ // MutableBoxValue (allocatable device arrays), for which bounds
+ // live in the runtime descriptor and are read by generating
+ // fir.box_dims IR.
----------------
jeanPerier wrote:
nit: no need for such level of details in the comments.
https://github.com/llvm/llvm-project/pull/227824
More information about the flang-commits
mailing list