From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32680 invoked by alias); 18 Dec 2008 19:54:20 -0000 Received: (qmail 32418 invoked by uid 48); 18 Dec 2008 19:53:12 -0000 Date: Thu, 18 Dec 2008 19:54:00 -0000 Message-ID: <20081218195312.32417.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/34571] [4.3/4.4 Regression] Segfault in alpha_expand_mov at -O3 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ubizjak at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg01786.txt.bz2 ------- 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 * 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