[PATCH] Fix ICE in ipa-cp due to cost addition overflow (PR 96806)

Richard Biener richard.guenther@gmail.com
Mon Aug 31 08:23:58 GMT 2020


On Mon, Aug 31, 2020 at 10:06 AM Feng Xue OS via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> This patch is to fix a bug that cost that is used to evaluate clone candidate
> becomes negative due to integer overflow.

OK.

Richard.

> Feng
> ---
> 2020-08-31  Feng Xue  <fxue@os.amperecomputing.com>
>
> gcc/
>         PR tree-optimization/96806
>         * ipa-cp.c (decide_about_value): Use safe_add to avoid cost addition
>         overflow.
>
> gcc/testsuite/
>         PR tree-optimization/96806
>         * g++.dg/ipa/pr96806.C: New test.


More information about the Gcc-patches mailing list