https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84101
--- Comment #20 from Richard Biener <rguenth at gcc dot gnu.org> --- Ah. Index: gcc/expr.c =================================================================== --- gcc/expr.c (revision 269960) +++ gcc/expr.c (working copy) @@ -7018,7 +7018,11 @@ store_field (rtx target, poly_int64 bits } } - temp = expand_normal (exp); + temp = expand_expr (exp, + known_eq (bitpos, 0) ? target : NULL_RTX, + VOIDmode, EXPAND_NORMAL); + if (temp == target) + return const0_rtx; /* We don't support variable-sized BLKmode bitfields, since our handling of BLKmode is bound up with the ability to break @@ -7641,6 +7645,8 @@ safe_from_p (const_rtx x, tree exp, int return 0; return 1; } + else if (TREE_CODE (exp) == SSA_NAME) + return 1; else if (TREE_CODE (exp) == ERROR_MARK) return 1; /* An already-visited SAVE_EXPR? */ else