[Ada] Spurious error on dependent expression that is an array
This patch fixes a spurious error on a array expression that is a
dependent expression of an if-expression, when the length of the array
matches that imposed by the context, but the bounds of both differ, in
particular when the expression and the context are both null arrays with
different bounds.
2018-12-03 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_res.adb (Apply_Check): For array types, apply a length
check rather than a qualification, to avoid spurious errors when
the value of a dependend expression has a matching length but
different bounds from those of the type of the contect.
gcc/testsuite/
* gnat.dg/array33.adb: New testcase.
From-SVN: r266758