aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2018-06-11 09:17:13 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-06-11 09:17:13 +0000
commit6778c2ca7b92a76c84c0affdc949d6f3e41c91c3 (patch)
treec61cb861c2d9ef8c0af913a2c78d71350b2555ee
parentd1ec7de559b75ece7e49da5415426f755916d34f (diff)
downloadgcc-6778c2ca7b92a76c84c0affdc949d6f3e41c91c3.zip
gcc-6778c2ca7b92a76c84c0affdc949d6f3e41c91c3.tar.gz
gcc-6778c2ca7b92a76c84c0affdc949d6f3e41c91c3.tar.bz2
[Ada] Minor reformatting
2018-06-11 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * exp_ch11.adb, exp_unst.adb, inline.adb, sem_ch12.adb, sem_util.adb: Minor reformatting. * sinfo.ads: Fix a typo. From-SVN: r261403
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/exp_ch11.adb4
-rw-r--r--gcc/ada/exp_unst.adb4
-rw-r--r--gcc/ada/inline.adb52
-rw-r--r--gcc/ada/sem_ch12.adb2
-rw-r--r--gcc/ada/sem_util.adb19
-rw-r--r--gcc/ada/sinfo.ads2
7 files changed, 51 insertions, 38 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 25e133e..481f64b 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_ch11.adb, exp_unst.adb, inline.adb, sem_ch12.adb, sem_util.adb:
+ Minor reformatting.
+ * sinfo.ads: Fix a typo.
+
2018-06-11 Ed Schonberg <schonberg@adacore.com>
* inline.adb (Expand_Inlined_Call): If no optimization level is
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
index b197c4e..da95b71 100644
--- a/gcc/ada/exp_ch11.adb
+++ b/gcc/ada/exp_ch11.adb
@@ -913,8 +913,8 @@ package body Exp_Ch11 is
Cond := Condition (Raise_S);
-- The only other possibility is a node that is or used to be a
- -- simple raise statement. Note that the string expression in
- -- the original Raise statement is ignored.
+ -- simple raise statement. Note that the string expression in the
+ -- original Raise statement is ignored.
else
Orig := Original_Node (Raise_S);
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb
index b38f2b6..3899de3 100644
--- a/gcc/ada/exp_unst.adb
+++ b/gcc/ada/exp_unst.adb
@@ -1194,8 +1194,8 @@ package body Exp_Unst is
Decl : Node_Id;
begin
- -- Subprograms declared in tasks and protected types
- -- are reachable and cannot be eliminated.
+ -- Subprograms declared in tasks and protected types are
+ -- reachable and cannot be eliminated.
if In_Synchronized_Unit (STJ.Ent) then
STJ.Reachable := True;
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index f7e6b28..4a3e122 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -2269,28 +2269,39 @@ package body Inline is
Subp : Entity_Id;
Orig_Subp : Entity_Id)
is
- Loc : constant Source_Ptr := Sloc (N);
- Is_Predef : constant Boolean :=
- Is_Predefined_Unit (Get_Source_Unit (Subp));
- Orig_Bod : constant Node_Id :=
+ Decls : constant List_Id := New_List;
+ Is_Predef : constant Boolean :=
+ Is_Predefined_Unit (Get_Source_Unit (Subp));
+ Loc : constant Source_Ptr := Sloc (N);
+ Orig_Bod : constant Node_Id :=
Body_To_Inline (Unit_Declaration_Node (Subp));
+
Uses_Back_End : constant Boolean :=
- Back_End_Inlining and then Optimization_Level > 0;
+ Back_End_Inlining and then Optimization_Level > 0;
-- The back-end expansion is used if the target supports back-end
-- inlining and some level of optimixation is required; otherwise
-- the inlining takes place fully as a tree expansion.
Blk : Node_Id;
Decl : Node_Id;
- Decls : constant List_Id := New_List;
- Exit_Lab : Entity_Id := Empty;
+ Exit_Lab : Entity_Id := Empty;
F : Entity_Id;
A : Node_Id;
- Lab_Decl : Node_Id := Empty;
+ Lab_Decl : Node_Id := Empty;
Lab_Id : Node_Id;
New_A : Node_Id;
- Num_Ret : Nat := 0;
+ Num_Ret : Nat := 0;
Ret_Type : Entity_Id;
+ Temp : Entity_Id;
+ Temp_Typ : Entity_Id;
+
+ Is_Unc : Boolean;
+ Is_Unc_Decl : Boolean;
+ -- If the type returned by the function is unconstrained and the call
+ -- can be inlined, special processing is required.
+
+ Return_Object : Entity_Id := Empty;
+ -- Entity in declaration in an extended_return_statement
Targ : Node_Id := Empty;
-- The target of the call. If context is an assignment statement then
@@ -2300,17 +2311,6 @@ package body Inline is
Targ1 : Node_Id := Empty;
-- A separate target used when the return type is unconstrained
- Temp : Entity_Id;
- Temp_Typ : Entity_Id;
-
- Return_Object : Entity_Id := Empty;
- -- Entity in declaration in an extended_return_statement
-
- Is_Unc : Boolean;
- Is_Unc_Decl : Boolean;
- -- If the type returned by the function is unconstrained and the call
- -- can be inlined, special processing is required.
-
procedure Declare_Postconditions_Result;
-- When generating C code, declare _Result, which may be used in the
-- inlined _Postconditions procedure to verify the return value.
@@ -2963,20 +2963,22 @@ package body Inline is
begin
First_Decl := First (Declarations (Blk));
- -- If the body is a single extended return statement,
- -- the resulting block is a nested block.
+ -- If the body is a single extended return statement,the
+ -- resulting block is a nested block.
if No (First_Decl) then
- First_Decl := First
- (Statements (Handled_Statement_Sequence (Blk)));
+ First_Decl :=
+ First (Statements (Handled_Statement_Sequence (Blk)));
if Nkind (First_Decl) = N_Block_Statement then
First_Decl := First (Declarations (First_Decl));
end if;
end if;
+ -- No front-end inlining possible
+
if Nkind (First_Decl) /= N_Object_Declaration then
- return; -- No front-end inlining possible,
+ return;
end if;
if Nkind (Parent (N)) /= N_Assignment_Statement then
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 5cc3015..246d9eb 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -9533,7 +9533,7 @@ package body Sem_Ch12 is
-- the corresponding private part.
if Parent (List_Containing (Get_Unit_Instantiation_Node (Par)))
- = Parent (List_Containing (N))
+ = Parent (List_Containing (N))
and then Sloc (Freeze_Node (Par)) < Sloc (N)
then
Insert_Freeze_Node_For_Instance (N, F_Node);
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 9ac04c3a..3902d6e 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -8334,13 +8334,18 @@ package body Sem_Util is
-- Search for the equality primitive; return Empty if the primitive is
-- not found.
+ ------------------
+ -- Find_Eq_Prim --
+ ------------------
+
function Find_Eq_Prim (Prims_List : Elist_Id) return Entity_Id is
- Prim_E : Elmt_Id := First_Elmt (Prims_List);
- Prim : Entity_Id;
+ Prim : Entity_Id;
+ Prim_Elmt : Elmt_Id;
begin
- while Present (Prim_E) loop
- Prim := Node (Prim_E);
+ Prim_Elmt := First_Elmt (Prims_List);
+ while Present (Prim_Elmt) loop
+ Prim := Node (Prim_Elmt);
-- Locate primitive equality with the right signature
@@ -8352,7 +8357,7 @@ package body Sem_Util is
return Prim;
end if;
- Next_Elmt (Prim_E);
+ Next_Elmt (Prim_Elmt);
end loop;
return Empty;
@@ -8360,8 +8365,8 @@ package body Sem_Util is
-- Local Variables
- Full_Type : Entity_Id;
Eq_Prim : Entity_Id;
+ Full_Type : Entity_Id;
-- Start of processing for Find_Primitive_Eq
@@ -19320,7 +19325,7 @@ package body Sem_Util is
begin
-- No marker needs to be created when switch -gnatH (legacy elaboration
-- checking mode enabled) is in effect because the legacy ABE mechanism
- -- does use markers.
+ -- does not use markers.
if Legacy_Elaboration_Checks then
return False;
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index 6aaeff8..22d7195 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -2371,7 +2371,7 @@ package Sinfo is
-- Split_PPC (Flag17)
-- When a Pre or Post aspect specification is processed, it is broken
- -- into AND THEN sections. The left most section has Split_PPC set to
+ -- into AND THEN sections. The leftmost section has Split_PPC set to
-- False, indicating that it is the original specification (e.g. for
-- posting errors). For other sections, Split_PPC is set to True.
-- This flag is set in both the N_Aspect_Specification node itself,