[Ada] Small cleanup in constraint checking code for allocators
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 24 Apr 2020 20:05:35 +0000 (22:05 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 18 Jun 2020 09:08:35 +0000 (05:08 -0400)
commit4bfab79a72afbe0f6232668fdfa4b56a6aaea2e6
tree0eb7817062f22f81cf24f5c5c5e18a4a7b35f83e
parentb93d80bc8fc58c4ef746a8ddc699167c3ededfb9
[Ada] Small cleanup in constraint checking code for allocators

2020-06-18  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_ch4.adb (Expand_Allocator_Expression): Apply constraint
and predicate checks for the qualified expression on entry,
followed by constraint and predicate checks for the allocator
itself, and return early if this results in a static error.
(Expand_N_Allocator): Do not do the same here.  Instead apply
constraint and predicate checks for arrays in the subtype
indication case.
* exp_ch5.adb (Expand_N_Assignment_Statement): Do not apply
range checks to allocators here.
gcc/ada/exp_ch4.adb
gcc/ada/exp_ch5.adb