llvm-project
2cf982c0 - [flang] Don't duplicate impure function call for UBOUND() (#153648)

Commit
32 days ago
[flang] Don't duplicate impure function call for UBOUND() (#153648) Because the per-dimension information in a descriptor holds an extent and a lower bound, but not an upper bound, the calculation of the upper bound sometimes requires that the extent and lower bound be extracted from a descriptor and added together, minus 1. This shouldn't be attempted when the NamedEntity of the descriptor is something that shouldn't be duplicated and used twice; specifically, it shouldn't apply to NamedEntities containing references to impure functions as parts of subscript expressions. Fixes https://github.com/llvm/llvm-project/issues/153031.
Author
Parents
Loading