Commit bc1146e5 by Hristian Kirtchev Committed by Pierre-Marie de Rodat

[Ada] Minor reformatting

2019-07-04  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
	Minor reformatting.

From-SVN: r273051
parent b04fe972
2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
* erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
Minor reformatting.
2019-07-04 Yannick Moy <moy@adacore.com> 2019-07-04 Yannick Moy <moy@adacore.com>
* sem_spark.adb (Explanation, Get_Expl): New functions to get * sem_spark.adb (Explanation, Get_Expl): New functions to get
......
...@@ -1606,6 +1606,7 @@ package body Erroutc is ...@@ -1606,6 +1606,7 @@ package body Erroutc is
if Start <= Cur_Loc and then Cur_Loc <= Stop then if Start <= Cur_Loc and then Cur_Loc <= Stop then
return True; return True;
end if; end if;
Cur_Loc := Instantiation_Location (Cur_Loc); Cur_Loc := Instantiation_Location (Cur_Loc);
end loop; end loop;
......
...@@ -1343,11 +1343,11 @@ package body Exp_Aggr is ...@@ -1343,11 +1343,11 @@ package body Exp_Aggr is
-- transient scope, which leads to premature finalization. -- transient scope, which leads to premature finalization.
-- This in-place expansion is not performed for limited transient -- This in-place expansion is not performed for limited transient
-- objects because the initialization is already done in-place. -- objects, because the initialization is already done in place.
if In_Place_Expansion then if In_Place_Expansion then
-- Suppress the removal of side effects by general analysis -- Suppress the removal of side effects by general analysis,
-- because this behavior is emulated here. This avoids the -- because this behavior is emulated here. This avoids the
-- generation of a transient scope, which leads to out-of-order -- generation of a transient scope, which leads to out-of-order
-- adjustment and finalization. -- adjustment and finalization.
...@@ -4181,8 +4181,8 @@ package body Exp_Aggr is ...@@ -4181,8 +4181,8 @@ package body Exp_Aggr is
return False; return False;
end if; end if;
-- If association has a box, no way to determine yet -- If association has a box, no way to determine yet whether
-- whether default can be assigned in place. -- default can be assigned in place.
elsif Box_Present (Expr) then elsif Box_Present (Expr) then
return False; return False;
...@@ -4239,8 +4239,8 @@ package body Exp_Aggr is ...@@ -4239,8 +4239,8 @@ package body Exp_Aggr is
and then Is_Array and then Is_Array
and then Check_Component (Prefix (Comp))) and then Check_Component (Prefix (Comp)))
or else (Nkind_In (Comp, N_Unchecked_Type_Conversion, or else (Nkind_In (Comp, N_Type_Conversion,
N_Type_Conversion) N_Unchecked_Type_Conversion)
and then Check_Component (Expression (Comp))); and then Check_Component (Expression (Comp)));
end Check_Component; end Check_Component;
...@@ -4269,12 +4269,10 @@ package body Exp_Aggr is ...@@ -4269,12 +4269,10 @@ package body Exp_Aggr is
return False; return False;
elsif Nkind (Parent (Expr)) = elsif Nkind (Parent (Expr)) = N_Iterated_Component_Association then
N_Iterated_Component_Association
then -- Ditto for iterated component associations, which in general
-- Ditto for iterated component associations, which in -- require an enclosing loop and involve nonstatic expressions.
-- general require an enclosing loop and involve nonstatic
-- expressions.
return False; return False;
end if; end if;
...@@ -4469,8 +4467,8 @@ package body Exp_Aggr is ...@@ -4469,8 +4467,8 @@ package body Exp_Aggr is
Establish_Transient_Scope (N, Manage_Sec_Stack => False); Establish_Transient_Scope (N, Manage_Sec_Stack => False);
end if; end if;
-- If the aggregate is nonlimited, create a temporary since aggregates -- If the aggregate is nonlimited, create a temporary, since aggregates
-- have "by copy" semantic. If it is limited and context is an -- have "by copy" semantics. If it is limited and context is an
-- assignment, this is a subaggregate for an enclosing aggregate being -- assignment, this is a subaggregate for an enclosing aggregate being
-- expanded. It must be built in place, so use target of the current -- expanded. It must be built in place, so use target of the current
-- assignment. -- assignment.
...@@ -4484,7 +4482,7 @@ package body Exp_Aggr is ...@@ -4484,7 +4482,7 @@ package body Exp_Aggr is
Rewrite (Parent (N), Make_Null_Statement (Loc)); Rewrite (Parent (N), Make_Null_Statement (Loc));
-- Do not declare a temporary to initialize an aggregate assigned to an -- Do not declare a temporary to initialize an aggregate assigned to an
-- identifier when in place assignment is possible preserving the -- identifier when in-place assignment is possible, preserving the
-- by-copy semantic of aggregates. This avoids large stack usage and -- by-copy semantic of aggregates. This avoids large stack usage and
-- generates more efficient code. -- generates more efficient code.
...@@ -5122,7 +5120,7 @@ package body Exp_Aggr is ...@@ -5122,7 +5120,7 @@ package body Exp_Aggr is
-- case pass it as is to Gigi. Note that a necessary condition for -- case pass it as is to Gigi. Note that a necessary condition for
-- static processing is that the aggregate be fully positional. -- static processing is that the aggregate be fully positional.
-- 5. If in place aggregate expansion is possible (i.e. no need to create -- 5. If in-place aggregate expansion is possible (i.e. no need to create
-- a temporary) then mark the aggregate as such and return. Otherwise -- a temporary) then mark the aggregate as such and return. Otherwise
-- create a new temporary and generate the appropriate initialization -- create a new temporary and generate the appropriate initialization
-- code. -- code.
...@@ -5146,7 +5144,7 @@ package body Exp_Aggr is ...@@ -5146,7 +5144,7 @@ package body Exp_Aggr is
-- The type of each index -- The type of each index
In_Place_Assign_OK_For_Declaration : Boolean := False; In_Place_Assign_OK_For_Declaration : Boolean := False;
-- True if we are to generate an in place assignment for a declaration -- True if we are to generate an in-place assignment for a declaration
Maybe_In_Place_OK : Boolean; Maybe_In_Place_OK : Boolean;
-- If the type is neither controlled nor packed and the aggregate -- If the type is neither controlled nor packed and the aggregate
...@@ -6214,7 +6212,7 @@ package body Exp_Aggr is ...@@ -6214,7 +6212,7 @@ package body Exp_Aggr is
-- STEP 4 -- STEP 4
-- Look if in place aggregate expansion is possible -- Check whether in-place aggregate expansion is possible
-- For object declarations we build the aggregate in place, unless -- For object declarations we build the aggregate in place, unless
-- the array is bit-packed. -- the array is bit-packed.
...@@ -6366,7 +6364,7 @@ package body Exp_Aggr is ...@@ -6366,7 +6364,7 @@ package body Exp_Aggr is
-- Step 5 -- Step 5
-- In place aggregate expansion is not possible -- In-place aggregate expansion is not possible
else else
Maybe_In_Place_OK := False; Maybe_In_Place_OK := False;
...@@ -6418,11 +6416,11 @@ package body Exp_Aggr is ...@@ -6418,11 +6416,11 @@ package body Exp_Aggr is
Target := New_Copy (Tmp); Target := New_Copy (Tmp);
end if; end if;
-- If we are to generate an in place assignment for a declaration or -- If we are to generate an in-place assignment for a declaration or
-- an assignment statement, and the assignment can be done directly -- an assignment statement, and the assignment can be done directly
-- by the back end, then do not expand further. -- by the back end, then do not expand further.
-- ??? We can also do that if in place expansion is not possible but -- ??? We can also do that if in-place expansion is not possible but
-- then we could go into an infinite recursion. -- then we could go into an infinite recursion.
if (In_Place_Assign_OK_For_Declaration or else Maybe_In_Place_OK) if (In_Place_Assign_OK_For_Declaration or else Maybe_In_Place_OK)
...@@ -7683,8 +7681,8 @@ package body Exp_Aggr is ...@@ -7683,8 +7681,8 @@ package body Exp_Aggr is
P : Node_Id := Parent (N); P : Node_Id := Parent (N);
begin begin
-- Aggregates are not supported for non standard rep clauses since -- Aggregates are not supported for nonstandard rep clauses, since they
-- they may lead to extra padding fields in CCG. -- may lead to extra padding fields in CCG.
if Ekind (Etype (N)) in Record_Kind if Ekind (Etype (N)) in Record_Kind
and then Has_Non_Standard_Rep (Etype (N)) and then Has_Non_Standard_Rep (Etype (N))
......
...@@ -2481,8 +2481,7 @@ package body Inline is ...@@ -2481,8 +2481,7 @@ package body Inline is
-- thunk generated for it. Replace a return statement with an assignment -- thunk generated for it. Replace a return statement with an assignment
-- to the target of the call, with appropriate conversions if needed. -- to the target of the call, with appropriate conversions if needed.
function Process_Formals_In_Aspects (N : Node_Id) function Process_Formals_In_Aspects (N : Node_Id) return Traverse_Result;
return Traverse_Result;
-- Because aspects are linked indirectly to the rest of the tree, -- Because aspects are linked indirectly to the rest of the tree,
-- replacement of formals appearing in aspect specifications must -- replacement of formals appearing in aspect specifications must
-- be performed in a separate pass, using an instantiation of the -- be performed in a separate pass, using an instantiation of the
...@@ -2832,10 +2831,11 @@ package body Inline is ...@@ -2832,10 +2831,11 @@ package body Inline is
-- Process_Formals_In_Aspects -- -- Process_Formals_In_Aspects --
-------------------------------- --------------------------------
function Process_Formals_In_Aspects (N : Node_Id) function Process_Formals_In_Aspects
return Traverse_Result (N : Node_Id) return Traverse_Result
is is
A : Node_Id; A : Node_Id;
begin begin
if Has_Aspects (N) then if Has_Aspects (N) then
A := First (Aspect_Specifications (N)); A := First (Aspect_Specifications (N));
...@@ -2849,7 +2849,7 @@ package body Inline is ...@@ -2849,7 +2849,7 @@ package body Inline is
end Process_Formals_In_Aspects; end Process_Formals_In_Aspects;
procedure Replace_Formals_In_Aspects is procedure Replace_Formals_In_Aspects is
new Traverse_Proc (Process_Formals_In_Aspects); new Traverse_Proc (Process_Formals_In_Aspects);
------------------ ------------------
-- Process_Sloc -- -- Process_Sloc --
......
...@@ -254,6 +254,7 @@ package body Opt is ...@@ -254,6 +254,7 @@ package body Opt is
if GNATprove_Mode then if GNATprove_Mode then
pragma Assert (Assertions_Enabled); pragma Assert (Assertions_Enabled);
null; null;
elsif GNAT_Mode_Config then elsif GNAT_Mode_Config then
Assertions_Enabled := Assertions_Enabled_Config; Assertions_Enabled := Assertions_Enabled_Config;
else else
......
...@@ -930,7 +930,8 @@ package body Sem_Ch3 is ...@@ -930,7 +930,8 @@ package body Sem_Ch3 is
-- declaration may include an expression that is an allocator, whose -- declaration may include an expression that is an allocator, whose
-- expansion needs the proper Master for the created tasks. -- expansion needs the proper Master for the created tasks.
if Nkind (Related_Nod) = N_Object_Declaration and then Expander_Active if Expander_Active
and then Nkind (Related_Nod) = N_Object_Declaration
then then
if Is_Limited_Record (Desig_Type) if Is_Limited_Record (Desig_Type)
and then Is_Class_Wide_Type (Desig_Type) and then Is_Class_Wide_Type (Desig_Type)
...@@ -940,7 +941,8 @@ package body Sem_Ch3 is ...@@ -940,7 +941,8 @@ package body Sem_Ch3 is
-- Similarly, if the type is an anonymous access that designates -- Similarly, if the type is an anonymous access that designates
-- tasks, create a master entity for it in the current context. -- tasks, create a master entity for it in the current context.
elsif Has_Task (Desig_Type) and then Comes_From_Source (Related_Nod) elsif Has_Task (Desig_Type)
and then Comes_From_Source (Related_Nod)
then then
Build_Master_Entity (Defining_Identifier (Related_Nod)); Build_Master_Entity (Defining_Identifier (Related_Nod));
Build_Master_Renaming (Anon_Type); Build_Master_Renaming (Anon_Type);
......
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