diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-11-01 09:20:17 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-11-10 08:57:40 +0000 |
commit | 99f8a653683b2e3f14713656c79dc2b721c38e0f (patch) | |
tree | 93f187e004bb821269ab53e75a8db325763cb0a5 /gcc/ada/exp_ch8.adb | |
parent | 0c66423ac99a0cbdb87b8019b7d5da3931b50045 (diff) | |
download | gcc-99f8a653683b2e3f14713656c79dc2b721c38e0f.zip gcc-99f8a653683b2e3f14713656c79dc2b721c38e0f.tar.gz gcc-99f8a653683b2e3f14713656c79dc2b721c38e0f.tar.bz2 |
[Ada] Don't carry action bodies for expansion of array equality
gcc/ada/
* exp_ch3.adb (Make_Eq_Body): Adapt call to
Expand_Record_Equality.
* exp_ch4.ads, exp_ch4.adb (Expand_Composite_Equality): Remove
Bodies parameter; adapt comment; fix style in body; adapt calls
to Expand_Record_Equality.
(Expand_Array_Equality): Adapt calls to
Expand_Composite_Equality.
(Expand_Record_Equality): Remove Bodies parameter; adapt
comment; adapt call to Expand_Composite_Equality.
* exp_ch8.adb (Build_Body_For_Renaming): Adapt call to
Expand_Record_Equality.
Diffstat (limited to 'gcc/ada/exp_ch8.adb')
-rw-r--r-- | gcc/ada/exp_ch8.adb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/gcc/ada/exp_ch8.adb b/gcc/ada/exp_ch8.adb index aa2c360..ff3c0eb 100644 --- a/gcc/ada/exp_ch8.adb +++ b/gcc/ada/exp_ch8.adb @@ -288,7 +288,6 @@ package body Exp_Ch8 is function Build_Body_For_Renaming (Typ : Entity_Id) return Node_Id is Left : constant Entity_Id := First_Formal (Id); Right : constant Entity_Id := Next_Formal (Left); - Bodies : List_Id; Body_Id : Entity_Id; Decl : Node_Id; @@ -318,12 +317,6 @@ package body Exp_Ch8 is -- subprogram. else - -- While expanding record equality we might create auxiliary - -- subprograms that will be placed in the declaration list of the - -- equality subprogram itself. - - Bodies := Empty_List; - Decl := Make_Subprogram_Body (Loc, Specification => @@ -332,7 +325,7 @@ package body Exp_Ch8 is Parameter_Specifications => Copy_Parameter_List (Id), Result_Definition => New_Occurrence_Of (Standard_Boolean, Loc)), - Declarations => Bodies, + Declarations => Empty_List, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List ( @@ -340,10 +333,9 @@ package body Exp_Ch8 is Expression => Expand_Record_Equality (Id, - Typ => Typ, - Lhs => Make_Identifier (Loc, Chars (Left)), - Rhs => Make_Identifier (Loc, Chars (Right)), - Bodies => Bodies))))); + Typ => Typ, + Lhs => Make_Identifier (Loc, Chars (Left)), + Rhs => Make_Identifier (Loc, Chars (Right))))))); end if; return Decl; |