public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/34571] [4.3/4.4 Regression] Segfault in alpha_expand_mov at -O3
Date: Thu, 18 Dec 2008 19:54:00 -0000	[thread overview]
Message-ID: <20081218195312.32417.qmail@sourceware.org> (raw)
In-Reply-To: <bug-34571-12387@http.gcc.gnu.org/bugzilla/>



------- 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


  parent reply	other threads:[~2008-12-18 19:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-24 12:53 [Bug target/34571] New: [4.3 " tbm at cyrius dot com
2007-12-24 12:53 ` [Bug target/34571] " tbm at cyrius dot com
2007-12-24 12:54 ` tbm at cyrius dot com
2007-12-24 13:14 ` pinskia at gcc dot gnu dot org
2007-12-26 17:25 ` rask at gcc dot gnu dot org
2007-12-28 18:33 ` tbm at cyrius dot com
2007-12-29 21:19 ` tbm at cyrius dot com
2008-01-02 23:18 ` mmitchel at gcc dot gnu dot org
2008-01-12 17:48 ` steven at gcc dot gnu dot org
2008-01-23 13:35 ` tbm at cyrius dot com
2008-02-19 22:24 ` [Bug target/34571] [4.3/4.4 " nightstrike at gmail dot com
2008-02-29 12:24 ` tbm at cyrius dot com
2008-03-15  0:44 ` jsm28 at gcc dot gnu dot org
2008-06-06 15:01 ` rguenth at gcc dot gnu dot org
2008-08-27 22:06 ` jsm28 at gcc dot gnu dot org
2008-11-22 11:18 ` steven at gcc dot gnu dot org
2008-12-18 15:39 ` ubizjak at gmail dot com
2008-12-18 19:54 ` ubizjak at gmail dot com [this message]
2008-12-22 17:52 ` uros at gcc dot gnu dot org
2008-12-22 17:55 ` [Bug target/34571] [4.3 " ubizjak at gmail dot com
2009-01-11 14:33 ` uros at gcc dot gnu dot org
2009-01-11 14:35 ` ubizjak at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081218195312.32417.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).