diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-11 10:48:19 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-11 10:48:19 +0200 |
commit | fb468a944c0dae2086e811b18d2da7935f642fc5 (patch) | |
tree | 1d9dccf79459f8edb5b09308f1dfd14eba524741 /gcc/ada/sem_aggr.adb | |
parent | 313d6f2c343c47b112863540d468d905d82a070b (diff) | |
download | gcc-fb468a944c0dae2086e811b18d2da7935f642fc5.zip gcc-fb468a944c0dae2086e811b18d2da7935f642fc5.tar.gz gcc-fb468a944c0dae2086e811b18d2da7935f642fc5.tar.bz2 |
[multiple changes]
2010-10-11 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Actuals): If an actual is the current instance of
a task type, it must be replaced with a reference to Self.
2010-10-11 Vincent Celier <celier@adacore.com>
* adaint.h: Add prototype for function __gnat_create_output_file_new.
2010-10-11 Javier Miranda <miranda@adacore.com>
* sem_aggr.adb (Collect_Aggr_Bounds): Remove side effects of collected
aggregate bounds.
From-SVN: r165280
Diffstat (limited to 'gcc/ada/sem_aggr.adb')
-rw-r--r-- | gcc/ada/sem_aggr.adb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 5574f65..c634b7f 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -526,9 +526,10 @@ package body Sem_Aggr is Is_Fully_Positional : Boolean := True; procedure Collect_Aggr_Bounds (N : Node_Id; Dim : Pos); - -- N is an array (sub-)aggregate. Dim is the dimension corresponding to - -- (sub-)aggregate N. This procedure collects the constrained N_Range - -- nodes corresponding to each index dimension of our aggregate itype. + -- N is an array (sub-)aggregate. Dim is the dimension corresponding + -- to (sub-)aggregate N. This procedure collects and removes the side + -- effects of the constrained N_Range nodes corresponding to each index + -- dimension of our aggregate itype. -- These N_Range nodes are collected in Aggr_Range above. -- -- Likewise collect in Aggr_Low & Aggr_High above the low and high @@ -552,6 +553,9 @@ package body Sem_Aggr is Expr : Node_Id; begin + Remove_Side_Effects (This_Low, Variable_Ref => True); + Remove_Side_Effects (This_High, Variable_Ref => True); + -- Collect the first N_Range for a given dimension that you find. -- For a given dimension they must be all equal anyway. |