[Ada] Fix a freezing issue
authorJavier Miranda <miranda@adacore.com>
Tue, 31 Jul 2018 09:55:26 +0000 (09:55 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 31 Jul 2018 09:55:26 +0000 (09:55 +0000)
commitb09a237ab879a169416c3be1af8a773e982fd53a
tree74ca9b929f74d2a445137d3a9061cf40dd349c44
parent3bb9bd7dcc46a48b45419072e552336d3e6569fd
[Ada] Fix a freezing issue

2018-07-31  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* sem.ads (Inside_Preanalysis_Without_Freezing): New global
counter.
* sem.adb (Semantics): This subprogram has now the
responsibility of resetting the counter before analyzing a unit,
and restoring its previous value before returning.
* freeze.adb (Freeze_Entity): Do not freeze if we are
preanalyzing without freezing.
* sem_res.adb (Preanalyze_And_Resolve): Set & restore
In_Preanalysis_Without_Freezing.

From-SVN: r263091
gcc/ada/ChangeLog
gcc/ada/freeze.adb
gcc/ada/sem.adb
gcc/ada/sem.ads
gcc/ada/sem_res.adb