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] Set lower bounds of array section fir.embox to one #1563

Closed jeanPerier closed 2 years ago

jeanPerier commented 2 years ago

Do not use the shift of a fir.embox to set lower bounds if there is an array section. This matches Fortran semantics where lower bounds of array sections are ones. The shift is needed/used in the array section base address computation.

jeanPerier commented 2 years ago

Updated the comment and commit message to talk about fir.slice instead if array section when talking about fir.embox,