[Ada] Fix small oversight in change to Optimize_Length_Comparison

Pierre-Marie de Rodat derodat@adacore.com
Wed Jun 17 08:16:10 GMT 2020


The previous change has introduced a type consistency issue when the
length comparison boils down to a comparison of the upper bounds.

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

2020-06-17  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_ch4.adb (Optimize_Length_Comparison): Make sure the base
	types are the same when comparing Y'Last and X'Last directly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2449 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200617/4f565309/attachment-0001.bin>


More information about the Gcc-patches mailing list