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/53853] FAIL: g++.dg/other/pr53811.C -std=gnu++* (internal compiler error)
Date: Fri, 06 Jul 2012 07:45:00 -0000	[thread overview]
Message-ID: <bug-53853-4-y8Jw31pSn0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53853-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53853

--- Comment #5 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-06 07:45:21 UTC ---
We can leave all the magic to legitimize_pic_address, so following alternative
patch is much clearer:

--cut here--
Index: i386.c
===================================================================
--- i386.c      (revision 189310)
+++ i386.c      (working copy)
@@ -33057,6 +33057,10 @@ x86_output_mi_thunk (FILE *file,
     emit_jump_insn (gen_indirect_jump (fnaddr));
   else
     {
+      if (flag_pic && SYMBOLIC_CONST (fnaddr))
+       fnaddr = legitimize_pic_address (fnaddr,
+                                        gen_rtx_REG (Pmode, tmp_regno));
+
       if (!sibcall_insn_operand (fnaddr, word_mode))
        {
          tmp = gen_rtx_REG (word_mode, tmp_regno);
--cut here--

With this patch, we get:

        .size   _ZN1D4foo2Ev, .-_ZN1D4foo2Ev
        .set    .LTHUNK0,_ZN1D4foo2Ev
        .p2align 4,,15
        .globl  _ZThn16_N1D4foo2Ev
        .type   _ZThn16_N1D4foo2Ev, @function
_ZThn16_N1D4foo2Ev:
.LFB15:
        .cfi_startproc
        subq    $16, %rdi
        movabsq $.LTHUNK0@GOTOFF, %r10
        addq    %rbx, %r10
        jmp     *%r10
        .cfi_endproc
.LFE15:
        .size   _ZThn16_N1D4foo2Ev, .-_ZThn16_N1D4foo2Ev

So, load off GOTOFF table, which works as well.


  parent reply	other threads:[~2012-07-06  7:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04 12:25 [Bug target/53853] New: " dominiq at lps dot ens.fr
2012-07-04 13:06 ` [Bug target/53853] " iains at gcc dot gnu.org
2012-07-05 12:07 ` ubizjak at gmail dot com
2012-07-05 12:10 ` ubizjak at gmail dot com
2012-07-05 14:07 ` dominiq at lps dot ens.fr
2012-07-06  7:45 ` ubizjak at gmail dot com [this message]
2012-07-06 10:03 ` ubizjak at gmail dot com
2012-07-10 17:54 ` uros at gcc dot gnu.org
2012-07-10 17:56 ` 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=bug-53853-4-y8Jw31pSn0@http.gcc.gnu.org/bugzilla/ \
    --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).