The following avoids a spurious BIT_INSERT_EXPR when rewriting a decl into SSA form.
Bootstrap & regtest running on x86_64-unknown-linux-gnu. Richard. 2019-11-02 Richard Biener <rguent...@suse.de> PR tree-optimization/92645 * tree-ssa.c (execute_update_addresses_taken): Avoid representing a full def of a vector via a BIT_INSERT_EXPR. Index: gcc/tree-ssa.c =================================================================== --- gcc/tree-ssa.c (revision 278893) +++ gcc/tree-ssa.c (working copy) @@ -1899,6 +1899,11 @@ execute_update_addresses_taken (void) && bitmap_bit_p (suitable_for_renaming, DECL_UID (sym)) && VECTOR_TYPE_P (TREE_TYPE (sym)) && TYPE_MODE (TREE_TYPE (sym)) != BLKmode + /* If it is a full replacement we can do better below. */ + && maybe_ne (wi::to_poly_offset + (TYPE_SIZE_UNIT (TREE_TYPE (lhs))), + wi::to_poly_offset + (TYPE_SIZE_UNIT (TREE_TYPE (sym)))) && known_ge (mem_ref_offset (lhs), 0) && known_gt (wi::to_poly_offset (TYPE_SIZE_UNIT (TREE_TYPE (sym))),