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

--- Comment #9 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:6e41c27bf549d957eb399d39d7d0c213f8733351

commit r11-1981-g6e41c27bf549d957eb399d39d7d0c213f8733351
Author: Richard Biener <rguent...@suse.de>
Date:   Thu Jul 9 16:03:45 2020 +0200

    fix constant folding from array CTORs

    This fixes the case where we try to fold a read from an
    array initalizer and happen to cross the boundary of
    multiple CTORs which isn't really supported.  For the
    interesting cases like the testcase we actually handle
    the folding by encoding the whole initializer.

    2020-07-10  Richard Biener  <rguent...@suse.de>

            PR tree-optimization/96133
            * gimple-fold.c (fold_array_ctor_reference): Do not
            recurse to folding a CTOR that does not fully cover the
            asked for object.

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

Reply via email to