print more understandable error message in case of unbounded arrays
commit91fb6463e432ae190ad4e01fc8b83abfe00d93c0
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 15 Oct 2013 11:11:53 +0000 (15 13:11 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 16 Oct 2013 13:25:23 +0000 (16 15:25 +0200)
tree8883749914c31eeedbd7c6a5f4df5caa504346a5
parentbc47e699bc6cd927b2d7bc77707941c73d6751ae
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>
gpu.c