flang-compiler / f18-llvm-project

Fork of llvm/llvm-project for f18. In sync with f18-mlir and f18.
http://llvm.org
28 stars 16 forks source link

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

Closed jeanPerier closed 2 years ago

jeanPerier commented 2 years ago

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 to be used to multiply the GEP offset. This lead to wrong address computation and caused segfaults.