[Bug tree-optimization/93516] [10 regression] ICE in verify_sra_access_forest, at tree-sra.c:2342 since r10-6322

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 14 14:04:00 GMT 2020


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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamborm@gcc.gnu.org>:

https://gcc.gnu.org/g:515dd04260c6049110d7624eaf1b276929dcd9af

commit r10-6636-g515dd04260c6049110d7624eaf1b276929dcd9af
Author: Martin Jambor <mjambor@suse.cz>
Date:   Fri Feb 14 15:02:35 2020 +0100

    sra: Avoid verification failure (PR 93516)

    get_ref_base_and_extent can return different sizes for COMPONENT_REFs
    and DECLs of the same type, with the latter including (more?)  padding.
    When in the IL there is an assignment between such a COMPONENT_REF and a
    DECL, SRA will try to propagate the access from the former as a child of
    the latter, creating an artificial reference that does not match the
    access's declared size, which triggers a verifier assert.

    Fixed by teaching the propagation functions about this special situation
    so that they don't do it.  The condition is the same that
    build_user_friendly_ref_for_offset uses so the artificial reference
    causing the verifier is guaranteed not to be created.

    2020-02-14  Martin Jambor  <mjambor@suse.cz>

        PR tree-optimization/93516
        * tree-sra.c (propagate_subaccesses_from_rhs): Do not create
        access of the same type as the parent.
        (propagate_subaccesses_from_lhs): Likewise.

        gcc/testsuite/
        * g++.dg/tree-ssa/pr93516.C: New test.


More information about the Gcc-bugs mailing list