[flang-commits] [PATCH] D123130: [flang] Fix fir.embox codegen with constant interior shape

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Apr 5 07:15:27 PDT 2022


jeanPerier created this revision.
jeanPerier added reviewers: clementval, schweitz.
jeanPerier added a project: Flang.
Herald added subscribers: mehdi_amini, jdoerfert.
Herald added a project: All.
jeanPerier requested review of this revision.

Fix https://github.com/flang-compiler/f18-llvm-project/issues/1416.

The `constRows` variable was being decremented too soon, causing the
last constant interior dimension extent being used to multiply the GEP
offset. This lead to wrong address computation and caused segfaults.

Note: also upstream fir.embox tests that can be upstreamed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123130

Files:
  flang/lib/Optimizer/CodeGen/CodeGen.cpp
  flang/test/Fir/embox.fir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123130.420498.patch
Type: text/x-patch
Size: 5960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220405/3781a234/attachment-0001.bin>


More information about the flang-commits mailing list