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

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

https://gcc.gnu.org/g:3870fe246f442d795ef2270c74f56dda9d0be26c

commit r11-8463-g3870fe246f442d795ef2270c74f56dda9d0be26c
Author: Richard Biener <rguent...@suse.de>
Date:   Tue May 11 10:58:35 2021 +0200

    middle-end/100509 - avoid folding constant to aggregate type

    When folding a constant initializer looking through aliases to
    incompatible types can lead to us trying to fold a constant
    to an aggregate type which can't work.  Simply avoid trying
    to constant fold non-register typed symbols.

    2021-05-11  Richard Biener  <rguent...@suse.de>

            PR middle-end/100509
            * gimple-fold.c (fold_gimple_assign): Only call
            get_symbol_constant_value on register type symbols.

            * gcc.dg/pr100509.c: New testcase.

    (cherry picked from commit ca8e8301180fa71de1a76769fc038df2ab85dfeb)

Reply via email to