Commit d6dffa66 by Hristian Kirtchev Committed by Arnaud Charlet

exp_attr.adb, [...]: Minor reformatting.

2015-11-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_attr.adb, freeze.adb, sem_util.adb, sem_ch13.adb: Minor
	reformatting.

From-SVN: r230235
parent 73f05f9f
2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
* exp_attr.adb, freeze.adb, sem_util.adb, sem_ch13.adb: Minor
reformatting.
2015-11-12 Ed Schonberg <schonberg@adacore.com> 2015-11-12 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling * exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling
......
...@@ -636,7 +636,6 @@ package body Exp_Attr is ...@@ -636,7 +636,6 @@ package body Exp_Attr is
is is
C_Type : constant Entity_Id := Base_Type (Component_Type (Arr)); C_Type : constant Entity_Id := Base_Type (Component_Type (Arr));
Curr : constant Entity_Id := Current_Scope; Curr : constant Entity_Id := Current_Scope;
Install : Boolean := False; Install : Boolean := False;
Scop : Entity_Id := Scope (Arr); Scop : Entity_Id := Scope (Arr);
...@@ -646,10 +645,10 @@ package body Exp_Attr is ...@@ -646,10 +645,10 @@ package body Exp_Attr is
and then Ekind (Scop) = E_Package and then Ekind (Scop) = E_Package
then then
Install := True; Install := True;
else
-- The component type may be private, in which case we install else
-- its full view to compile the subprogram. -- The component type may be private, in which case we install its
-- full view to compile the subprogram.
Scop := Scope (C_Type); Scop := Scope (C_Type);
...@@ -665,9 +664,7 @@ package body Exp_Attr is ...@@ -665,9 +664,7 @@ package body Exp_Attr is
-- If we are within an instance body, then all visibility has been -- If we are within an instance body, then all visibility has been
-- established already and there is no need to install the package. -- established already and there is no need to install the package.
if Install if Install and then not In_Instance_Body then
and then not In_Instance_Body
then
Push_Scope (Scop); Push_Scope (Scop);
Install_Visible_Declarations (Scop); Install_Visible_Declarations (Scop);
Install_Private_Declarations (Scop); Install_Private_Declarations (Scop);
......
...@@ -680,14 +680,15 @@ package body Freeze is ...@@ -680,14 +680,15 @@ package body Freeze is
declare declare
O_Ent : Entity_Id; O_Ent : Entity_Id;
Off : Boolean; Off : Boolean;
begin begin
Find_Overlaid_Entity (Addr, O_Ent, Off); Find_Overlaid_Entity (Addr, O_Ent, Off);
if Ekind (O_Ent) = E_Constant if Ekind (O_Ent) = E_Constant
and then Etype (O_Ent) = Typ and then Etype (O_Ent) = Typ
and then Present (Constant_Value (O_Ent)) and then Present (Constant_Value (O_Ent))
and then Compile_Time_Compare ( and then Compile_Time_Compare
Init, (Init,
Constant_Value (O_Ent), Constant_Value (O_Ent),
Assume_Valid => True) = EQ Assume_Valid => True) = EQ
then then
......
...@@ -4725,11 +4725,13 @@ package body Sem_Ch13 is ...@@ -4725,11 +4725,13 @@ package body Sem_Ch13 is
Find_Overlaid_Entity (N, O_Ent, Off); Find_Overlaid_Entity (N, O_Ent, Off);
if Present (O_Ent) then if Present (O_Ent) then
-- If the object overlays a constant object, mark it so -- If the object overlays a constant object, mark it so
if Is_Constant_Object (O_Ent) then if Is_Constant_Object (O_Ent) then
Set_Overlays_Constant (U_Ent); Set_Overlays_Constant (U_Ent);
end if; end if;
else else
-- If this is not an overlay, mark a variable as being -- If this is not an overlay, mark a variable as being
-- volatile to prevent unwanted optimizations. It's a -- volatile to prevent unwanted optimizations. It's a
...@@ -4744,9 +4746,9 @@ package body Sem_Ch13 is ...@@ -4744,9 +4746,9 @@ package body Sem_Ch13 is
end if; end if;
end if; end if;
-- Overlaying controlled objects is erroneous. -- Overlaying controlled objects is erroneous. Emit warning
-- Emit warning but continue analysis because program is -- but continue analysis because program is itself legal,
-- itself legal, and back-end must see address clause. -- and back-end must see address clause.
if Present (O_Ent) if Present (O_Ent)
and then (Has_Controlled_Component (Etype (O_Ent)) and then (Has_Controlled_Component (Etype (O_Ent))
......
...@@ -16267,6 +16267,7 @@ package body Sem_Util is ...@@ -16267,6 +16267,7 @@ package body Sem_Util is
Addr : constant Node_Id := Address_Clause (Ent); Addr : constant Node_Id := Address_Clause (Ent);
O_Ent : Entity_Id; O_Ent : Entity_Id;
Off : Boolean; Off : Boolean;
begin begin
Find_Overlaid_Entity (Addr, O_Ent, Off); Find_Overlaid_Entity (Addr, O_Ent, Off);
......
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