[Ada] Don't carry action bodies for expansion of array equality

Pierre-Marie de Rodat derodat@adacore.com
Wed Nov 10 08:58:37 GMT 2021

Expansion of array equality creates a function, which needs to be
inserted into the AST. The insertion point was carried from
Expand_N_Op_Eq to Expand_Record_Equality and Expand_Array_Equality,
which were mutually recursive (via Expand_Composite_Equality). Now these
routines are no longer recursive, so there is no need to carry the
insertion point between them.

Tested on x86_64-pc-linux-gnu, committed on trunk


	* exp_ch3.adb (Make_Eq_Body): Adapt call to
	* 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_Record_Equality): Remove Bodies parameter; adapt
	comment; adapt call to Expand_Composite_Equality.
	* exp_ch8.adb (Build_Body_For_Renaming): Adapt call to
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 9508 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211110/59af0397/attachment-0001.bin>

More information about the Gcc-patches mailing list