From 35fdafcdda2be3cab0ce595ab2f06aca2f1cef77 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 30 Oct 2014 12:46:20 +0100 Subject: [PATCH] Recommit wrongly reverted change. From-SVN: r216924 --- gcc/ada/a-cimutr.adb | 21 +++++++++++---------- gcc/ada/freeze.adb | 12 ++++++------ gcc/ada/opt.adb | 2 +- gcc/ada/s-os_lib.adb | 2 ++ 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/gcc/ada/a-cimutr.adb b/gcc/ada/a-cimutr.adb index 2405a172eb8..0d3f16455ee 100644 --- a/gcc/ada/a-cimutr.adb +++ b/gcc/ada/a-cimutr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1217,6 +1217,7 @@ package body Ada.Containers.Indefinite_Multiway_Trees is Position : out Cursor; Count : Count_Type := 1) is + First : Tree_Node_Access; Last : Tree_Node_Access; Element : Element_Access; @@ -1249,8 +1250,6 @@ package body Ada.Containers.Indefinite_Multiway_Trees is with "attempt to tamper with cursors (tree is busy)"; end if; - Position.Container := Parent.Container; - declare -- The element allocator may need an accessibility check in the case -- the actual type is class-wide or has access discriminants (see @@ -1264,16 +1263,16 @@ package body Ada.Containers.Indefinite_Multiway_Trees is Element := new Element_Type'(New_Item); end; - Position.Node := new Tree_Node_Type'(Parent => Parent.Node, - Element => Element, - others => <>); - - Last := Position.Node; + First := new Tree_Node_Type'(Parent => Parent.Node, + Element => Element, + others => <>); + Last := First; for J in Count_Type'(2) .. Count loop + -- Reclaim other nodes if Storage_Error. ??? - Element := new Element_Type'(New_Item); + Element := new Element_Type'(New_Item); Last.Next := new Tree_Node_Type'(Parent => Parent.Node, Prev => Last, Element => Element, @@ -1283,7 +1282,7 @@ package body Ada.Containers.Indefinite_Multiway_Trees is end loop; Insert_Subtree_List - (First => Position.Node, + (First => First, Last => Last, Parent => Parent.Node, Before => Before.Node); @@ -1293,6 +1292,8 @@ package body Ada.Containers.Indefinite_Multiway_Trees is -- nodes we just inserted. Container.Count := Container.Count + Count; + + Position := Cursor'(Parent.Container, First); end Insert_Child; ------------------------- diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 44921d0243c..63da31844a0 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -3569,11 +3569,15 @@ package body Freeze is Next_Entity (Comp); end loop; - SSO_ADC := Get_Attribute_Definition_Clause - (Rec, Attribute_Scalar_Storage_Order); + -- Deal with default setting of reverse storage order + + Set_SSO_From_Default (Rec); -- Check consistent attribute setting on component types + SSO_ADC := Get_Attribute_Definition_Clause + (Rec, Attribute_Scalar_Storage_Order); + declare Comp_ADC_Present : Boolean; begin @@ -3589,10 +3593,6 @@ package body Freeze is end loop; end; - -- Deal with default setting of reverse storage order - - Set_SSO_From_Default (Rec); - -- Now deal with reverse storage order/bit order issues if Present (SSO_ADC) then diff --git a/gcc/ada/opt.adb b/gcc/ada/opt.adb index 9631ff48a3c..0afab6515f3 100644 --- a/gcc/ada/opt.adb +++ b/gcc/ada/opt.adb @@ -171,6 +171,7 @@ package body Opt is Ada_Version := Ada_Version_Runtime; Ada_Version_Pragma := Empty; + Default_SSO := ' '; Dynamic_Elaboration_Checks := False; Extensions_Allowed := True; External_Name_Exp_Casing := As_Is; @@ -194,7 +195,6 @@ package body Opt is Assertions_Enabled := Assertions_Enabled_Config; Assume_No_Invalid_Values := Assume_No_Invalid_Values_Config; Check_Policy_List := Check_Policy_List_Config; - Default_SSO := Default_SSO_Config; SPARK_Mode := SPARK_Mode_Config; SPARK_Mode_Pragma := SPARK_Mode_Pragma_Config; else diff --git a/gcc/ada/s-os_lib.adb b/gcc/ada/s-os_lib.adb index 3fad849b87a..5f70faba0ab 100644 --- a/gcc/ada/s-os_lib.adb +++ b/gcc/ada/s-os_lib.adb @@ -797,6 +797,8 @@ package body System.OS_Lib is return C_Create_File (C_Name (C_Name'First)'Address); end Create_New_Output_Text_File; + -- Start of processing for Create_Temp_File_Internal + begin -- Loop until a new temp file can be created -- 2.11.4.GIT