[Bug target/34571] [4.3/4.4 Regression] Segfault in alpha_expand_mov at -O3
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Dec 18 19:54:00 GMT 2008
------- Comment #16 from ubizjak at gmail dot com 2008-12-18 19:53 -------
(In reply to comment #15)
> I will re-bootstrap/re-test this patch. Will take some days to retest.
It looks to me, that we need to fix this from the other side. According to the
comment above symbolic_operand predicate, we should also accept label_ref with
an offset, so:
Index: varasm.c
===================================================================
--- varasm.c (revision 142326)
+++ varasm.c (working copy)
@@ -3710,7 +3710,7 @@
/* FALLTHRU */
case LABEL_REF:
- tmp = XEXP (x, 0);
+ tmp = XEXP (tmp, 0);
gcc_assert (!INSN_DELETED_P (tmp));
gcc_assert (!NOTE_P (tmp)
|| NOTE_KIND (tmp) != NOTE_INSN_DELETED);
Index: config/alpha/predicates.md
===================================================================
--- config/alpha/predicates.md (revision 142326)
+++ config/alpha/predicates.md (working copy)
@@ -390,7 +390,8 @@
(ior (match_code "symbol_ref,label_ref")
(and (match_code "const")
(match_test "GET_CODE (XEXP (op,0)) == PLUS
- && GET_CODE (XEXP (XEXP (op,0), 0)) == SYMBOL_REF
+ && (GET_CODE (XEXP (XEXP (op,0), 0)) == SYMBOL_REF
+ || GET_CODE (XEXP (XEXP (op,0), 0)) == LABEL_REF)
&& GET_CODE (XEXP (XEXP (op,0), 1)) == CONST_INT"))))
;; Return true if OP is valid for 16-bit DTP relative relocations.
BTW: The fix to varasm.c is already in mainline, need to backport
2008-03-31 James E. Wilson <wilson@tuliptree.org>
* varasm.c (output_constant_pool_1): In LABEL_REF check,
use tmp consistently.
BTW: The test doesn't fail anymore neither on 4.4 and neither on 4.3 branch.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-12-18 19:53:11
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34571
More information about the Gcc-bugs
mailing list