[Ada] Cleanup redundant conditions in checks for overlapping actuals

Pierre-Marie de Rodat derodat@adacore.com
Thu Jun 17 14:33:10 GMT 2021


Detection of overlapping actuals based on the mode and type of the
formal parameters (i.e. IN/OUT/IN-OUT and elementary/composite) involved
repeated conditions both in the outer loop (i.e. conditions applied to
first formal) and in the inner loop (i.e. conditions applied to both
formals).

Those repeated conditions were duplicating the ones described as three
cases that lead to overlapping. Code cleanup; semantics is unaffected.

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

gcc/ada/

	* sem_warn.adb (Warn_On_Overlapping_Actuals): Remove repeated
	code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 12613 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210617/cf0557ac/attachment-0001.bin>


More information about the Gcc-patches mailing list