On Wed, 16 Feb 2022, Andre Vieira (lists) wrote:

> Hi,
> 
> As reported on PR104498, the issue here is that when compare_base_symbol_refs
> swaps x and y but doesn't take that into account when computing the distance.
> This patch makes sure that if x and y are swapped, we correct the distance
> computation by multiplying it by -1 to end up with the correct expected result
> of the original Y_BASE - X_BASE.
> 
> Bootstrapped and regression tested on aarch64-none-linux.
> 
> OK for trunk?

OK.

Thanks,
Richard.

> gcc/ChangeLog:
> 
>         PR middle-end/104498
>         * alias.cc (compare_base_symbol_refs): Correct distance 
> computation when
>         swapping x and y.
> 

Reply via email to