Commit b3408631 by Robert Dewar Committed by Arnaud Charlet

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

2012-07-16  Robert Dewar  <dewar@adacore.com>

	* exp_pakd.adb, freeze.adb, sem_util.adb, vms_data.ads: Minor
	reformatting.

From-SVN: r189516
parent 8bae3cef
2012-07-16 Robert Dewar <dewar@adacore.com>
* exp_pakd.adb, freeze.adb, sem_util.adb, vms_data.ads: Minor
reformatting.
2012-07-12 Vasiliy Fofanov <fofanov@adacore.com> 2012-07-12 Vasiliy Fofanov <fofanov@adacore.com>
* vms_data.ads: Add VMS qualifiers for -gnatn1/2 switches. * vms_data.ads: Add VMS qualifiers for -gnatn1/2 switches.
......
...@@ -570,13 +570,12 @@ package body Exp_Pakd is ...@@ -570,13 +570,12 @@ package body Exp_Pakd is
Swap_F := RTE (Swap_RE); Swap_F := RTE (Swap_RE);
return Unchecked_Convert_To return
(T, Unchecked_Convert_To (T,
Make_Function_Call (Loc, Make_Function_Call (Loc,
Name => Name => New_Occurrence_Of (Swap_F, Loc),
New_Occurrence_Of (Swap_F, Loc), Parameter_Associations =>
Parameter_Associations => New_List (Unchecked_Convert_To (Etype (Swap_F), N))));
New_List (Unchecked_Convert_To (Etype (Swap_F), N))));
end Byte_Swap; end Byte_Swap;
------------------------------ ------------------------------
...@@ -1534,8 +1533,8 @@ package body Exp_Pakd is ...@@ -1534,8 +1533,8 @@ package body Exp_Pakd is
Set_Etype (New_Rhs, T); Set_Etype (New_Rhs, T);
if Reverse_Storage_Order (Base_Type (Atyp)) if Reverse_Storage_Order (Base_Type (Atyp))
and then Esize (T) > 8 and then Esize (T) > 8
and then not In_Reverse_Storage_Order_Object (Obj) and then not In_Reverse_Storage_Order_Object (Obj)
then then
Require_Byte_Swapping := True; Require_Byte_Swapping := True;
New_Rhs := Byte_Swap (New_Rhs); New_Rhs := Byte_Swap (New_Rhs);
...@@ -2042,8 +2041,8 @@ package body Exp_Pakd is ...@@ -2042,8 +2041,8 @@ package body Exp_Pakd is
-- in Expand_Bit_Packed_Element_Set). -- in Expand_Bit_Packed_Element_Set).
if Reverse_Storage_Order (Atyp) if Reverse_Storage_Order (Atyp)
and then Esize (Atyp) > 8 and then Esize (Atyp) > 8
and then not In_Reverse_Storage_Order_Object (Obj) and then not In_Reverse_Storage_Order_Object (Obj)
then then
Obj := Byte_Swap (Obj); Obj := Byte_Swap (Obj);
end if; end if;
......
...@@ -1046,9 +1046,8 @@ package body Freeze is ...@@ -1046,9 +1046,8 @@ package body Freeze is
(Type_Definition (Declaration_Node (Encl_Type))); (Type_Definition (Declaration_Node (Encl_Type)));
end if; end if;
-- Note: the Reverse_Storage_Order flag is set on the base type, -- Note: the Reverse_Storage_Order flag is set on the base type, but
-- but the attribute definition clause is attached to the first -- the attribute definition clause is attached to the first subtype.
-- subtype.
Comp_Type := Base_Type (Comp_Type); Comp_Type := Base_Type (Comp_Type);
ADC := Get_Attribute_Definition_Clause ADC := Get_Attribute_Definition_Clause
...@@ -1057,16 +1056,17 @@ package body Freeze is ...@@ -1057,16 +1056,17 @@ package body Freeze is
if (Is_Record_Type (Comp_Type) or else Is_Array_Type (Comp_Type)) if (Is_Record_Type (Comp_Type) or else Is_Array_Type (Comp_Type))
and then and then
(No (ADC) or else Reverse_Storage_Order (Encl_Type) (No (ADC) or else Reverse_Storage_Order (Encl_Type) /=
/= Reverse_Storage_Order (Etype (Comp_Type))) Reverse_Storage_Order (Etype (Comp_Type)))
then then
Error_Msg_N Error_Msg_N
("component type must have same scalar storage order as " ("component type must have same scalar storage order as "
& "enclosing composite", Err_Node); & "enclosing composite", Err_Node);
elsif Aliased_Present (Comp_Def) then elsif Aliased_Present (Comp_Def) then
Error_Msg_N ("aliased component not permitted for type with " Error_Msg_N
& "explicit Scalar_Storage_Order", Err_Node); ("aliased component not permitted for type with "
& "explicit Scalar_Storage_Order", Err_Node);
end if; end if;
end Check_Component_Storage_Order; end Check_Component_Storage_Order;
...@@ -3746,7 +3746,7 @@ package body Freeze is ...@@ -3746,7 +3746,7 @@ package body Freeze is
-- Check for scalar storage order -- Check for scalar storage order
if Present (Get_Attribute_Definition_Clause if Present (Get_Attribute_Definition_Clause
(E, Attribute_Scalar_Storage_Order)) (E, Attribute_Scalar_Storage_Order))
then then
Check_Component_Storage_Order (E, Empty); Check_Component_Storage_Order (E, Empty);
end if; end if;
......
...@@ -6312,11 +6312,11 @@ package body Sem_Util is ...@@ -6312,11 +6312,11 @@ package body Sem_Util is
function In_Reverse_Storage_Order_Object (N : Node_Id) return Boolean is function In_Reverse_Storage_Order_Object (N : Node_Id) return Boolean is
Pref : Node_Id; Pref : Node_Id;
Btyp : Entity_Id := Empty; Btyp : Entity_Id := Empty;
begin
Pref := N;
begin
-- Climb up indexed components -- Climb up indexed components
Pref := N;
loop loop
case Nkind (Pref) is case Nkind (Pref) is
when N_Selected_Component => when N_Selected_Component =>
...@@ -6336,9 +6336,10 @@ package body Sem_Util is ...@@ -6336,9 +6336,10 @@ package body Sem_Util is
Btyp := Base_Type (Etype (Pref)); Btyp := Base_Type (Etype (Pref));
end if; end if;
return Present (Btyp) return
and then (Is_Record_Type (Btyp) or else Is_Array_Type (Btyp)) Present (Btyp)
and then Reverse_Storage_Order (Btyp); and then (Is_Record_Type (Btyp) or else Is_Array_Type (Btyp))
and then Reverse_Storage_Order (Btyp);
end In_Reverse_Storage_Order_Object; end In_Reverse_Storage_Order_Object;
-------------------------------------- --------------------------------------
......
...@@ -1826,6 +1826,9 @@ package VMS_Data is ...@@ -1826,6 +1826,9 @@ package VMS_Data is
-- (/OPTIMIZE=SOME) or higher (/OPTIMIZE=UNROLL_LOOPS) -- (/OPTIMIZE=SOME) or higher (/OPTIMIZE=UNROLL_LOOPS)
-- levels of optimization. -- levels of optimization.
-- --
-- PRAGMA_LEVEL_1/2 not documented ???
--
--
-- FULL Front end inlining. The front end inlining activated -- FULL Front end inlining. The front end inlining activated
-- by this switch is generally more extensive, and quite -- by this switch is generally more extensive, and quite
-- often more effective than the standard PRAGMA inlining -- often more effective than the standard PRAGMA inlining
......
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