[Ada] Further fix non-stored discriminant in aggregate for GNATprove
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 22 Jul 2019 13:57:18 +0000 (13:57 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 22 Jul 2019 13:57:18 +0000 (13:57 +0000)
commit2c26d262eb40998040308a57d420849fd764ef53
treead86ead6ecaf4265f5c0ca53de99abe66e94e43b
parent2418e23139edd33f1cab2158b46ac9bbd81b8bd7
[Ada] Further fix non-stored discriminant in aggregate for GNATprove

GNATprove expects discriminants appearing in aggregates and their types
to be resolved to stored discriminants.  This extends the machinery that
makes sure this is the case for default initialization expressions so as
to also handle component associations in these expressions.

2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* sem_aggr.adb (Rewrite_Bound): Be prepared for discriminals
too.
(Rewrite_Range;): Minor tweak.
(Resolve_Record_Aggregate): For a component with default
initialization whose expression is an array aggregate, also
rewrite the bounds of the component associations, if any.

From-SVN: r273679
gcc/ada/ChangeLog
gcc/ada/sem_aggr.adb