Adds a hint to the warning message to disable a warning and updates the
tests to expect this.
Also fixes a bug in the storage of canonical spelling of error flags so
that they are not used after free.
An empty array shouldn't be subscripted, but sometimes they are in
zero-trip loops in real applications. So change a recently added error
message to a warning (off by default).
An array that has one or more empty dimensions cannot have subscripts
unless there's a possibility that they constitute an empty array
section.
We previously only checked that constant subscripts are in bounds.
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.
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
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