diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2019-08-20 09:50:34 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-08-20 09:50:34 +0000 |
commit | aa090e20d4bb02e829aa7e4d9e49ba06b94e0d5f (patch) | |
tree | f37d5c3a6f0b8fce901af57d9357f99aef71d9f8 /gcc | |
parent | dd6e65c618576b52c46bc6fbf28ac6b91bce2951 (diff) | |
download | gcc-aa090e20d4bb02e829aa7e4d9e49ba06b94e0d5f.zip gcc-aa090e20d4bb02e829aa7e4d9e49ba06b94e0d5f.tar.gz gcc-aa090e20d4bb02e829aa7e4d9e49ba06b94e0d5f.tar.bz2 |
[Ada] Inconsistent scope chain due to quantified expression
Routine Build_DIC_Procedure_Declaration appears to be heavily inspired
by Build_Invariant_Procedure_Declaration; they both wrap an expression
attached to a type inside an internal procedure. Initially none of them
were calling Set_Last_Entity.
For Build_Invariant_Procedure_Declaration this was fixed previously.
For Build_DIC_Procedure_Declaration this is fixed here.
The issue affects the GNATprove tool and is not visible to end users of
the GNAT compiler. No simple test is available because this would
require a debug session.
2019-08-20 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* exp_util.adb (Build_DIC_Procedure_Declaration): Set the last
entity of the generated Default_Initial_Condition procedure in
order to construct a proper entity chain.
From-SVN: r274741
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/exp_util.adb | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a27d1d9..f914d06 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2019-08-20 Piotr Trojanek <trojanek@adacore.com> + + * exp_util.adb (Build_DIC_Procedure_Declaration): Set the last + entity of the generated Default_Initial_Condition procedure in + order to construct a proper entity chain. + 2019-08-20 Yannick Moy <moy@adacore.com> * exp_spark.adb (Expand_SPARK_N_Slice_Or_Indexed_Component): diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 41708c3..78019ab 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -1977,6 +1977,7 @@ package body Exp_Util is Set_Scope (Obj_Id, Proc_Id); Set_First_Entity (Proc_Id, Obj_Id); + Set_Last_Entity (Proc_Id, Obj_Id); -- Generate: -- procedure <Work_Typ>DIC (_object : <Work_Typ>); |