print more understandable error message in case of unbounded arrays
If an array is passed as an argument to a function, then the extent
in the outer dimension is unknown unless the static keyword is used
in the argument declaration. By only considering the outer indices
that are actually accessed, we can usually determine a bound on the
accessed slice. However, in case of data dependent accesses, we may
not be able to obtain a bound on the outer index. We used to print
a cryptic error message in this case. Now we print a more readable
error message.
In future, we may want to exploit the type of the index expression
to obtain a bound on the array anyway.
Requested-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>