From 3292dd408163da24f70fb93e962d0b9cdf20f74a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 11 Feb 2015 16:09:48 +0100 Subject: re PR middle-end/65003 (-fsection-anchors ICE) PR middle-end/65003 * varasm.c (place_block_symbol): Assert that DECL_RTL of the ultimate alias is MEM with SYMBOL_REF satisfying SYMBOL_REF_HAS_BLOCK_INFO_P as its operand. Don't pass the MEM to place_block_symbol, but instead pass the SYMBOL_REF operand of it. * g++.dg/opt/pr65003.C: New test. From-SVN: r220625 --- gcc/varasm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/varasm.c') diff --git a/gcc/varasm.c b/gcc/varasm.c index eb65b1f..3f62fca 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -7180,6 +7180,10 @@ place_block_symbol (rtx symbol) { 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; -- cgit v1.1