From: Arnaud Charlet Date: Fri, 10 Oct 2014 13:28:21 +0000 (+0200) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=80363c2f0bf302e569c12d86352e4d086c2e6d4d;p=gcc.git [multiple changes] 2014-10-10 Robert Dewar * sem_ch13.adb: Minor code reorganization. 2014-10-10 Pat Rogers * gnat_rm.texi: Text now indicates pragma No_Run_Time is not for users. 2014-10-10 Vadim Godunko * a-coinho-shared.adb: Add minor comment. * a-stzmap.adb (To_Sequence): Compute size of result array. From-SVN: r216081 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d8408eb3d35..c7df2c19c7d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,17 @@ +2014-10-10 Robert Dewar + + * sem_ch13.adb: Minor code reorganization. + +2014-10-10 Pat Rogers + + * gnat_rm.texi: Text now indicates pragma No_Run_Time is not + for users. + +2014-10-10 Vadim Godunko + + * a-coinho-shared.adb: Add minor comment. + * a-stzmap.adb (To_Sequence): Compute size of result array. + 2014-10-10 Javier Miranda * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an diff --git a/gcc/ada/a-coinho-shared.adb b/gcc/ada/a-coinho-shared.adb index 1f3d8bc5f91..94d4fe4249f 100644 --- a/gcc/ada/a-coinho-shared.adb +++ b/gcc/ada/a-coinho-shared.adb @@ -25,6 +25,13 @@ -- . -- ------------------------------------------------------------------------------ +-- Note: special attention must be paid to the case of simultaneous access +-- to internal shared objects and elements by difference tasks. The Reference +-- counter of internal shared object is the only component protected using +-- atomic operations; other components and elements can be modified only when +-- reference counter is equal to one (so there are no other references to this +-- internal shared object and element). + with Ada.Unchecked_Deallocation; package body Ada.Containers.Indefinite_Holders is diff --git a/gcc/ada/a-stzmap.adb b/gcc/ada/a-stzmap.adb index 08cae19bd83..0afe4ff868f 100644 --- a/gcc/ada/a-stzmap.adb +++ b/gcc/ada/a-stzmap.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-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- -- @@ -570,20 +570,25 @@ package body Ada.Strings.Wide_Wide_Maps is function To_Sequence (Set : Wide_Wide_Character_Set) return Wide_Wide_Character_Sequence is - SS : constant Wide_Wide_Character_Ranges_Access := Set.Set; - - Result : Wide_Wide_String (Positive range 1 .. 2 ** 16); - N : Natural := 0; + SS : constant Wide_Wide_Character_Ranges_Access := Set.Set; + N : Natural := 0; + Count : Natural := 0; begin for J in SS'Range loop - for K in SS (J).Low .. SS (J).High loop - N := N + 1; - Result (N) := K; - end loop; + Count := + Count + (Wide_Wide_Character'Pos (SS (J).High) - + Wide_Wide_Character'Pos (SS (J).Low) + 1); end loop; - return Result (1 .. N); + return Result : Wide_Wide_String (1 .. Count) do + for J in SS'Range loop + for K in SS (J).Low .. SS (J).High loop + N := N + 1; + Result (N) := K; + end loop; + end loop; + end return; end To_Sequence; ------------ diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index e5a52bc23f1..5554f68db4d 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -4748,11 +4748,9 @@ pragma No_Run_Time; @noindent This is an obsolete configuration pragma that historically was used to -setup what is now called the "zero footprint" library. It causes any -library units outside this basic library to be ignored. The use of -this pragma has been superseded by the general configurable run-time -capability of @code{GNAT} where the compiler takes into account whatever -units happen to be accessible in the library. +set up a runtime library with no object code. It is now used only for +internal testing. The pragma has been superseded by the reconfigurable +runtime capability of @code{GNAT}. @node Pragma No_Strict_Aliasing @unnumberedsec Pragma No_Strict_Aliasing diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 10f4a7480b6..709dabe29db 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -10706,10 +10706,11 @@ package body Sem_Ch13 is Set_Has_Inheritable_Invariants (Typ); end if; - -- If the full view of the type is a scalar type or array type, the - -- implicit base type created for it has the same invariant. + -- If we have a subtype with invariants, whose base type does not have + -- invariants, copy these invariants to the base type. This happens for + -- the case of implicit base types created for scalar and array types. - elsif Has_Invariants (Typ) and then Base_Type (Typ) /= Typ + elsif Has_Invariants (Typ) and then not Has_Invariants (Base_Type (Typ)) then Set_Has_Invariants (Base_Type (Typ));