[Ada] Refine checks for uplevel references
authorEd Schonberg <schonberg@adacore.com>
Fri, 25 May 2018 09:03:09 +0000 (09:03 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Fri, 25 May 2018 09:03:09 +0000 (09:03 +0000)
commit5fe0b8c32cbafad220cfc7668bde71c2cf8d072f
tree1b91f81318a1fd8d623be5df5c497629f10826be
parent8218cfde96a4e9df2ce00fabc3d616d6f3cfc83c
[Ada] Refine checks for uplevel references

2018-05-25  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* exp_unst.adb (Visit_Node): Restrict check for uplevel references in
prefixes of array attributes, to prefixes that are entity names whose
type is constrained.
(Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
subprogram, as itype created for loops in pre/postcondition may appear
in loops at the library level.

From-SVN: r260717
gcc/ada/ChangeLog
gcc/ada/exp_unst.adb