r266758 - in /trunk/gcc: ada/ChangeLog ada/sem_...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Mon Dec 3 15:49:00 GMT 2018
Author: pmderodat
Date: Mon Dec 3 15:49:50 2018
New Revision: 266758
URL: https://gcc.gnu.org/viewcvs?rev=266758&root=gcc&view=rev
Log:
[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.
Added:
trunk/gcc/testsuite/gnat.dg/array33.adb
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/sem_res.adb
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list