[flang-commits] [flang] [flang] Fixed designator codegen for contiguous boxes. (PR #139003)
via flang-commits
flang-commits at lists.llvm.org
Fri May 9 01:16:06 PDT 2025
================
@@ -412,12 +412,44 @@ class DesignateOpConversion
auto indices = designate.getIndices();
int i = 0;
auto attrs = designate.getIsTripletAttr();
+
+ // If the shape specifies a shift and the base is not a box,
+ // then we have to subtract the lower bounds, as long as
+ // fir.array_coor does not support non-default lower bounds
+ // for non-box accesses.
----------------
jeanPerier wrote:
I am not sure I get it. Is fir.array_coor not honoring fir.shape_shift? That seems like a big bug in its codegen.
I think this may be related to my comment in the HLFIRTools.cpp helper though, genVariableFirBaseShapeAndParams should not return a fir.shift it the exv is not a box (it should be a fir.shape_shift).
https://github.com/llvm/llvm-project/pull/139003
More information about the flang-commits
mailing list