https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82569
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Eric Botcazou from comment #7) > It's a conflict with the out-of-ssa pass: this pass implicitly expects every > pseudo associated with a partition to be always fully initialized, including > a DImode pseudo for a partition attached to a SImode variable. And this is > guaranteed for promoted SUBREGs because expand_gimple_stmt_1 makes sure > that, if one of the them is on the LHS of an assignment, then the whole > SUBREG_REG is assigned (with the appropriate extension). But this falls for > other SUBREGs. > > So an immediate fix would be to generate the glue code between partitions > with undefined values and other partitions in insert_partition_copy_on_edge, > but I'm starting to wonder whether the entire approach shouldn't be scrapped > instead. Sounds indeed like a hack ontop of a hack :/ But I don't fully understand the new issue - what are "other SUBREGs"? The SUBREG_PROMOTED_VAR setting is set per subreg so we should be able to handle those okish? Like change temp = gen_lowpart_SUBREG (mode, decl_rtl); /* We cannot assume anything about an existing extension if the register may contain uninitialized bits. */ if (always_initialized_rtx) { SUBREG_PROMOTED_VAR_P (temp) = 1; SUBREG_PROMOTED_SET (temp, unsignedp); } to if (always_initialized_rtx && mode == TYPE_MODE (TREE_TYPE (exp))) ? Not sure if this captures the issue as said.