-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] Don't emit false errors on LBOUND/UBOUND of assumed-rank arrays
Folding of LBOUND/UBOUND on assumed-rank arrays could lead to bogus errors later. This is a regression from a recent change intended to ensure that patently bad DIM= arguments were caught even in the case of assumed-rank. Rearrange the order of checks so that those bad DIM= argument values are caught but otherwise defer LBOUND/UBOUND of assumed-rank arguments to run time. (It was tempting to always fold LBOUND(ar,DIM=n) to 1, but that would obscure the run time error required when 'n' is out of bounds, including the case of a scalar 'ar'.) Differential Revision: https://reviews.llvm.org/D156755
- Loading branch information
Showing
2 changed files
with
31 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters