This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix fir.embox codegen with constant interior shape
ClosedPublic

Authored by jeanPerier on Apr 5 2022, 7:15 AM.

Details

Summary

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.

Diff Detail

Event Timeline

jeanPerier created this revision.Apr 5 2022, 7:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2022, 7:15 AM
jeanPerier requested review of this revision.Apr 5 2022, 7:15 AM
This revision is now accepted and ready to land.Apr 5 2022, 7:21 AM