[Bug middle-end/100786] [9/10 Regression] ICE: in fold_convert_loc with alias attribute and different types and different sizes

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 21 12:52:12 GMT 2022


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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:1e1b247774e0239f73b59e07f30db4e400f9b4eb

commit r10-10549-g1e1b247774e0239f73b59e07f30db4e400f9b4eb
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Jan 20 14:25:51 2022 +0100

    middle-end/100786 - constant folding from incompatible alias

    The following avoids us ICEing doing constant folding from variables
    with aliases of different types.  The issue appears both in
    folding and CCP and FRE can do more fancy stuff to still constant
    fold cases where the load is smaller than the initializer so
    defer it to there.

    2022-01-20  Richard Biener  <rguenther@suse.de>

            PR middle-end/100786
            * gimple-fold.c (get_symbol_constant_value): Only return
            values of compatible type to the symbol.

            * gcc.dg/torture/pr100786.c: New testcase.

    (cherry picked from commit 5c12507f5d0bc080e4f346af99824e039236e61c)


More information about the Gcc-bugs mailing list