[Ada] Fix ICE related to type freezing
commit829e64d49bba83fca1033fd43191343af369660f
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Sep 2018 09:16:28 +0000 (26 09:16 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Sep 2018 09:16:28 +0000 (26 09:16 +0000)
tree2e9a021faa638f307b95c2e1fbeea3e4ba315c44
parent72b189b6a82262f7a4fe69185db3824e230ffd8c
[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).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264602 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/contracts.adb
gcc/ada/freeze.adb