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

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

https://gcc.gnu.org/g:ca8e8301180fa71de1a76769fc038df2ab85dfeb

commit r12-712-gca8e8301180fa71de1a76769fc038df2ab85dfeb
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.

Reply via email to