From b6784d9087199e43c77a626b3de277bec9f08088 Mon Sep 17 00:00:00 2001 From: Hristian Kirtchev Date: Thu, 24 May 2018 13:05:54 +0000 Subject: [PATCH] [Ada] Minor reformatting 2018-05-24 Hristian Kirtchev gcc/ada/ * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting. From-SVN: r260658 --- gcc/ada/ChangeLog | 4 ++++ gcc/ada/exp_ch7.adb | 28 +++++++++++++++++----------- gcc/ada/sem_ch3.adb | 6 +++--- gcc/ada/sem_res.adb | 6 +++--- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 2e80976..cf19019 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2018-05-24 Hristian Kirtchev + + * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting. + 2018-05-24 Ed Schonberg * exp_aggr.adb (Flatten): Add a warning on an others clause in an array diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index d27150f..de21674 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -1781,15 +1781,20 @@ package body Exp_Ch7 is if Present (Mark_Id) then declare - Release : Node_Id := - Build_SS_Release_Call (Loc, Mark_Id); + Release : Node_Id := Build_SS_Release_Call (Loc, Mark_Id); + begin - -- If this is a build-in-place function, then we need to - -- release the secondary stack, unless we are returning on the - -- secondary stack. We wrap the release call in: - -- if BIP_Alloc_Form /= Secondary_Stack then ... - -- If we are returning on the secondary stack, then releasing - -- is the caller's responsibility (or caller's caller, or ...). + -- If the context is a build-in-place function, the secondary + -- stack must be released, unless the build-in-place function + -- itself is returning on the secondary stack. Generate: + -- + -- if BIP_Alloc_Form /= Secondary_Stack then + -- SS_Release (Mark_Id); + -- end if; + -- + -- Note that if the function returns on the secondary stack, + -- then the responsibility of reclaiming the space is always + -- left to the caller (recursively if needed). if Nkind (N) = N_Subprogram_Body then declare @@ -1802,7 +1807,7 @@ package body Exp_Ch7 is if BIP_SS then Release := Make_If_Statement (Loc, - Condition => + Condition => Make_Op_Ne (Loc, Left_Opnd => New_Occurrence_Of @@ -1810,8 +1815,9 @@ package body Exp_Ch7 is (Spec_Id, BIP_Alloc_Form), Loc), Right_Opnd => Make_Integer_Literal (Loc, - UI_From_Int (BIP_Allocation_Form'Pos - (Secondary_Stack)))), + UI_From_Int + (BIP_Allocation_Form'Pos + (Secondary_Stack)))), Then_Statements => New_List (Release)); end if; diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 57a662a..1a3e4d4 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -7862,7 +7862,7 @@ package body Sem_Ch3 is if Present (Full_View (Parent_Type)) and then not Is_Itype (Derived_Type) - and then not (Is_Concurrent_Type (Full_View (Parent_Type))) + and then not Is_Concurrent_Type (Full_View (Parent_Type)) then declare Der_Base : constant Entity_Id := Base_Type (Derived_Type); @@ -13444,7 +13444,7 @@ package body Sem_Ch3 is if Is_Itype (Def_Id) and then Has_Predicates (T) then Inherit_Predicate_Flags (Def_Id, T); - -- Indicate where the predicate function may be found. + -- Indicate where the predicate function may be found if Is_Itype (T) then if Present (Predicate_Function (Def_Id)) then @@ -21759,7 +21759,7 @@ package body Sem_Ch3 is if Has_Predicates (Subtype_Mark_Id) then Inherit_Predicate_Flags (Def_Id, Subtype_Mark_Id); - -- Indicate where the predicate function may be found. + -- Indicate where the predicate function may be found if No (Predicate_Function (Def_Id)) then Set_Predicated_Parent (Def_Id, Subtype_Mark_Id); diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index f6caccc..6329d92 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -7293,9 +7293,9 @@ package body Sem_Res is end if; end if; - -- We may be resolving an entity within expanded code, so a reference - -- to an entity should be ignored when calculating effective use clauses - -- to avoid inappropriate marking. + -- We may be resolving an entity within expanded code, so a reference to + -- an entity should be ignored when calculating effective use clauses to + -- avoid inappropriate marking. if Comes_From_Source (N) then Mark_Use_Clauses (E); -- 2.7.4