Commit 8777c5a6 by Arnaud Charlet

[multiple changes]

2012-05-15  Robert Dewar  <dewar@adacore.com>

	* sem_ch5.adb, sem_util.adb, s-stposu.adb, exp_ch4.adb: Minor
	reformatting.

2012-05-15  Geert Bosch  <bosch@adacore.com>

	* uintp.adb (UI_Rem): Remove optimizations, as they are complex and are
	not needed.
	(Sum_Digits): Remove, no longer used.
	(Sum_Double_Digits): Likewise.

2012-05-15  Yannick Moy  <moy@adacore.com>

	* aspects.ads: Minor typo.

2012-05-15  Thomas Quinot  <quinot@adacore.com>

	* gnat_rm.texi (Scalar_Storage_Order): Fix RM reference.
	* sem_ch13.adb: Minor comment fix: incorrect RM reference.

2012-05-15  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_prag.adb (Process_Atomic_Shared_Volatile): Propagate
	atomicity from an object to its underlying type only if it
	is composite.

From-SVN: r187532
parent b25ce290
2012-05-15 Robert Dewar <dewar@adacore.com>
* sem_ch5.adb, sem_util.adb, s-stposu.adb, exp_ch4.adb: Minor
reformatting.
2012-05-15 Geert Bosch <bosch@adacore.com>
* uintp.adb (UI_Rem): Remove optimizations, as they are complex and are
not needed.
(Sum_Digits): Remove, no longer used.
(Sum_Double_Digits): Likewise.
2012-05-15 Yannick Moy <moy@adacore.com>
* aspects.ads: Minor typo.
2012-05-15 Thomas Quinot <quinot@adacore.com>
* gnat_rm.texi (Scalar_Storage_Order): Fix RM reference.
* sem_ch13.adb: Minor comment fix: incorrect RM reference.
2012-05-15 Eric Botcazou <ebotcazou@adacore.com>
* sem_prag.adb (Process_Atomic_Shared_Volatile): Propagate
atomicity from an object to its underlying type only if it
is composite.
2012-05-15 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Set kind of
......
......@@ -56,7 +56,7 @@
-- This may involve adding some nodes to the tree to perform additional
-- treatments later.
-- 5. Ff the semantic analysis of expressions/names in the aspect should not
-- 5. If the semantic analysis of expressions/names in the aspect should not
-- occur at the point the aspect is defined, add code in the adequate
-- semantic analysis procedure for the aspect. For example, this is the
-- case for aspects Pre and Post on subprograms, which are pre-analyzed
......
......@@ -10117,6 +10117,7 @@ package body Exp_Ch4 is
-------------------------------
procedure Insert_Dereference_Action (N : Node_Id) is
function Is_Checked_Storage_Pool (P : Entity_Id) return Boolean;
-- Return true if type of P is derived from Checked_Pool;
......@@ -10183,6 +10184,7 @@ package body Exp_Ch4 is
end if;
-- Extract the address of the dereferenced object. Generate:
-- Addr : System.Address := <N>'Pool_Address;
Addr := Make_Temporary (Loc, 'P');
......@@ -10198,6 +10200,7 @@ package body Exp_Ch4 is
Attribute_Name => Name_Pool_Address)));
-- Calculate the size of the dereferenced object. Generate:
-- Size : Storage_Count := <N>.all'Size / Storage_Unit;
Deref :=
......@@ -10210,8 +10213,10 @@ package body Exp_Ch4 is
Insert_Action (N,
Make_Object_Declaration (Loc,
Defining_Identifier => Size,
Object_Definition =>
New_Reference_To (RTE (RE_Storage_Count), Loc),
Expression =>
Make_Op_Divide (Loc,
Left_Opnd =>
......
......@@ -6780,7 +6780,7 @@ component value, possibly applying some shift and mask operatings on the
enclosing machine scalar), and the opposite operation is done for
writes.
In that case, the restrictions set forth in 10.3/2 for scalar components
In that case, the restrictions set forth in 13.5.1(10.3/2) for scalar components
are relaxed. Instead, the following rules apply:
@itemize @bullet
......
......@@ -56,6 +56,10 @@ package body System.Storage_Pools.Subpools is
procedure Detach (N : not null SP_Node_Ptr);
-- Unhook a subpool node from an arbitrary subpool list
-----------------------------------
-- Adjust_Controlled_Dereference --
-----------------------------------
procedure Adjust_Controlled_Dereference
(Addr : in out System.Address;
Storage_Size : in out System.Storage_Elements.Storage_Count;
......
......@@ -423,7 +423,7 @@ package body Sem_Ch13 is
end if;
end if;
-- Give error message for RM 13.4.1(10) violation
-- Give error message for RM 13.5.1(10) violation
else
Error_Msg_FE
......
......@@ -1683,7 +1683,7 @@ package body Sem_Ch5 is
begin
Typ := Etype (Iter_Name);
-- Protect against malformed iterator.
-- Protect against malformed iterator
if Typ = Any_Type then
Error_Msg_N ("invalid expression in loop iterator", Iter_Name);
......
......@@ -3022,16 +3022,29 @@ package body Sem_Prag is
Set_Has_Delayed_Freeze (E);
end if;
-- An interesting improvement here. If an object of type X is
-- declared atomic, and the type X is not atomic, that's a
-- An interesting improvement here. If an object of composite
-- type X is declared atomic, and the type X isn't, that's a
-- pity, since it may not have appropriate alignment etc. We
-- can rescue this in the special case where the object and
-- type are in the same unit by just setting the type as
-- atomic, so that the back end will process it as atomic.
-- Note: we used to do this for elementary types as well,
-- but that turns out to be a bad idea and can have unwanted
-- effects, most notably if the type is elementary, the object
-- a simple component within a record, and both are in a spec:
-- every object of this type in the entire program will be
-- treated as atomic, thus incurring a potentially costly
-- synchronization operation for every access.
-- Of course it would be best if the back end could just adjust
-- the alignment etc for the specific object, but that's not
-- something we are capable of doing at this point.
Utyp := Underlying_Type (Etype (E));
if Present (Utyp)
and then Is_Composite_Type (Utyp)
and then Sloc (E) > No_Location
and then Sloc (Utyp) > No_Location
and then
......
......@@ -8684,7 +8684,7 @@ package body Sem_Util is
then
return True;
-- A function call is never a variable.
-- A function call is never a variable
elsif Nkind (N) = N_Function_Call then
return False;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment