[Ada] Fix ICE related to type freezing
authorEd Schonberg <schonberg@adacore.com>
Wed, 26 Sep 2018 09:16:28 +0000 (09:16 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 26 Sep 2018 09:16:28 +0000 (09:16 +0000)
commit33d2551767100d004ffa85efbd1165cb731dc87d
tree2e9a021faa638f307b95c2e1fbeea3e4ba315c44
parentf0f2d1fc033cbe56098f7261d91ef6a8130d0b27
[Ada] Fix ICE related to type freezing

2018-09-26  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* contracts.adb (Expand_Subprogram_Contract,
Process_Preconditions_For): Apply Freeze_Expr_Types to the
expression for a precondition of an expression function that is
a completion, when the completion appears in the private part
and the declaration it completes is in the visible part of the
same package.
* freeze.adb (Freeze_Expr_Types): Do not establish the scope of
the operation if it is already installed, as will be the case
when called to analyze the contract oc the subprogram (which
happens when generating code inside the subprogram body).

From-SVN: r264602
gcc/ada/ChangeLog
gcc/ada/contracts.adb
gcc/ada/freeze.adb