[Ada] Use predefined equality for arrays inside records

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


The equality of arrays inside records always applies the predefined
equality, just like for elementary types. In Expand_Composite_Equality
we had some dedicated code for arrays inside records which was failing
to duplicate a similar code in Expand_N_Op_Eq, e.g. it was failing to
apply validity checks.

This patch removes this dedicated and unnecessarily duplicated code.

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

gcc/ada/

	* exp_ch4.adb (Expand_Composite_Equality): Handle arrays inside
	records just like scalars; only records inside records need
	dedicated handling.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 3419 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211110/76bea99b/attachment.bin>


More information about the Gcc-patches mailing list