diff options
author | Jakub Jelinek <jakub@redhat.com> | 2015-02-11 16:09:48 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2015-02-11 16:09:48 +0100 |
commit | 3292dd408163da24f70fb93e962d0b9cdf20f74a (patch) | |
tree | e5f86c81bfe3b01ac68e6e8a3ea54b48e9ba6241 /gcc/varasm.c | |
parent | ce888a99a964f06c912b90dd75a55b79f93c86cd (diff) | |
download | gcc-3292dd408163da24f70fb93e962d0b9cdf20f74a.zip gcc-3292dd408163da24f70fb93e962d0b9cdf20f74a.tar.gz gcc-3292dd408163da24f70fb93e962d0b9cdf20f74a.tar.bz2 |
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
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |