summaryrefslogtreecommitdiffstats
path: root/gcc/ada/sem_ch5.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-22 13:51:35 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-22 13:51:35 +0000
commit96f7d17741c76109b6aa1e3065a703e3b112df47 (patch)
treed3c6af85269ff86cfccfd1ce960ea98326ee49aa /gcc/ada/sem_ch5.adb
parentabd567adb093491c2955bb252cafac13fbd6aabd (diff)
downloadppe42-gcc-96f7d17741c76109b6aa1e3065a703e3b112df47.tar.gz
ppe42-gcc-96f7d17741c76109b6aa1e3065a703e3b112df47.zip
2010-10-22 Jerome Lambourg <lambourg@adacore.com>
* gnatlink.adb (Process_Binder_File): Remove CLI-specific code, now moved to dotnet-ld. (Gnatlink): Remove CLI-specific code, moved to dotnet-ld * bindgen.adb (Gen_Object_Files_Options): Do not issue -L switches with the .NET compiler, useless and unsupported. 2010-10-22 Robert Dewar <dewar@adacore.com> * sem_util.ads (Get_Num_Lit_From_Pos): Fix errors in documentation, this returns a Node_Id for a reference to the entity, not the entity itself! 2010-10-22 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Iteration_Scheme): use Insert_Actions when bounds require a temporary. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165827 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch5.adb')
-rw-r--r--gcc/ada/sem_ch5.adb9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index e79da0ab994..692b1798edd 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -1550,23 +1550,20 @@ package body Sem_Ch5 is
return Expression (Decl);
end if;
- -- Here we make a declaration with a separate assignment statement
+ -- Here we make a declaration with a separate assignment
+ -- statement, and insert before loop header.
Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => Id,
Object_Definition => New_Occurrence_Of (Typ, Loc));
- Insert_Before (Parent (N), Decl);
- Analyze (Decl);
-
Assign :=
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Id, Loc),
Expression => Relocate_Node (Original_Bound));
- Insert_Before (Parent (N), Assign);
- Analyze (Assign);
+ Insert_Actions (Parent (N), New_List (Decl, Assign));
Rewrite (Original_Bound, New_Occurrence_Of (Id, Loc));
OpenPOWER on IntegriCloud