3 Commits

Author SHA1 Message Date
Peter Klausler
a5eb6bdd8e
[flang] Relax overindexing error to warning for last dummy dimension (#71725)
Compilation-time subscript value range checking should emit a warning,
not an error, when the indexed array is a dummy argument; there's
old-school codes out there that should have used assumed-size dummy
arguments but didn't.
2023-11-13 15:59:34 -08:00
Peter Klausler
325bd52893 [flang] More subscript triplet checking at compilation time
When a triplet's lower and upper bounds are the same, we can
check them without requiring a constant stride.

Differential Revision: https://reviews.llvm.org/D142943
2023-01-31 08:18:48 -08:00
Peter Klausler
10b990a03b [flang] Diagnose known out-of-range subscripts in more circumstances
Semantics can catch out-of-range subscript values already when they
appear in DATA statement objects and constant folding of name constant
array indexing; this patch fills the gap by checking known constant
subscript values in other contexts.

Differential Revision: https://reviews.llvm.org/D142764
2023-01-28 15:27:17 -08:00