This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/65232] [5 Regression] bootstrap failure (ICE in change_symbol_block, at varasm.c:1230) on arm-linux-gnueabihf, in libstdc++ stage1
- From: "aldyh at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 28 Feb 2015 17:36:56 +0000
- Subject: [Bug bootstrap/65232] [5 Regression] bootstrap failure (ICE in change_symbol_block, at varasm.c:1230) on arm-linux-gnueabihf, in libstdc++ stage1
- Auto-submitted: auto-generated
- References: <bug-65232-4 at http dot gcc dot gnu dot org/bugzilla/>
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?