[Bug rtl-optimization/99376] sanitizer detects undefined behaviour in rtlanal.c

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 5 11:47:48 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99376

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>:

https://gcc.gnu.org/g:28354bc22bd66648891a875ee08ca2b27debf2a2

commit r11-7521-g28354bc22bd66648891a875ee08ca2b27debf2a2
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Fri Mar 5 12:38:49 2021 +0100

    Fix undefined behavior spotted by the sanitizer

    gcc/
            PR rtl-optimization/99376
            * rtlanal.c (nonzero_bits1) <arithmetic operators>: If the number
            of low-order zero bits is too large, set the result to 0 directly.


More information about the Gcc-bugs mailing list