https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65232
--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- For the following symbol: (symbol_ref:SI ("_ZTCSt9strstream8_So") [flags 0x82] <var_decl 0x7fffeecd4090 _ZTCSt9strstream8_So>) We fail this assertion: change_symbol_block (rtx symbol, struct object_block *block) { if (block != SYMBOL_REF_BLOCK (symbol)) { gcc_assert (SYMBOL_REF_BLOCK_OFFSET (symbol) < 0); SYMBOL_REF_BLOCK (symbol) = block; } } The symbol's block offset has been previously set (to 0) in place_block_symbol here: if (snode->alias) { rtx target = DECL_RTL (snode->ultimate_alias_target ()->decl); gcc_assert (MEM_P (target) && GET_CODE (XEXP (target, 0)) == SYMBOL_REF && SYMBOL_REF_HAS_BLOCK_INFO_P (XEXP (target, 0))); target = XEXP (target, 0); place_block_symbol (target); SYMBOL_REF_BLOCK_OFFSET (symbol) = SYMBOL_REF_BLOCK_OFFSET (target); return; } Interestingly, without the patch in r221040, snode->alias is not set, so a different path is used to set the offset. Be that as it may, the killer is that change_symbol_block() is being called on mainline through do_assemble_alias -> make_decl_rtl, because the symbol is considered an alias which it wasn't in r221040. Honza?