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 <jamb...@gcc.gnu.org>: https://gcc.gnu.org/g:515dd04260c6049110d7624eaf1b276929dcd9af commit r10-6636-g515dd04260c6049110d7624eaf1b276929dcd9af Author: Martin Jambor <mjam...@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 <mjam...@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.