public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/63534] New: [5 Regression] Bootstrap failure on x86_64/i686-linux
@ 2014-10-14 12:31 jakub at gcc dot gnu.org
  2014-10-14 12:46 ` [Bug target/63534] " rguenth at gcc dot gnu.org
                   ` (61 more replies)
  0 siblings, 62 replies; 63+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-10-14 12:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63534

            Bug ID: 63534
           Summary: [5 Regression] Bootstrap failure on x86_64/i686-linux
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, wrong-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: ian at gcc dot gnu.org, kyukhin at gcc dot gnu.org, law at gcc dot gnu.org,
                    vmakarov at gcc dot gnu.org

r216154 broke bootstrap on x86_64-linux and i686-linux for me, pretty much
everything in libgo ICEs, including as simple testcases as:
void foo (void) {}
with -m32 -fsplit-stack -fpic (with or without -O?).
Seems the pro_and_epilogue pass adds insn like:
(insn 14 13 15 3 (set (reg:SI 3 bx)
        (reg:SI 83)) g2.i:3 90 {*movsi_internal}
     (nil))
before a call to __morestack added during the prologue expansion, which of
course isn't right, this is after reload and using a pseudo is not allowed.

Also, looking at a simple testcase like:
void foo (void) { bar (); bar (); }
I see wrong-code for -m32 -O2 -fpic -p:
there is
call    *mcount@GOT(%ebx)
before set_got is invoked, so if e.g. the routine is called from executable,
where %ebx can contain pretty much anything, it will crash, or if it is called
from a different shared library, it will access unrelated pointer in that other
shared library's got rather than current library's got.

And lastly, I'm seeing on the same testcase significant code quality regression
with just -m32 -O2 -fpic:
        .cfi_startproc
-       pushl   %ebx
+       pushl   %esi
        .cfi_def_cfa_offset 8
-       .cfi_offset 3, -8
-       call    __x86.get_pc_thunk.bx
-       addl    $_GLOBAL_OFFSET_TABLE_, %ebx
-       subl    $8, %esp
+       .cfi_offset 6, -8
+       pushl   %ebx
+       .cfi_def_cfa_offset 12
+       .cfi_offset 3, -12
+       call    __x86.get_pc_thunk.si
+       addl    $_GLOBAL_OFFSET_TABLE_, %esi
+       subl    $4, %esp
        .cfi_def_cfa_offset 16
+       movl    %esi, %ebx
        call    bar@PLT
        call    bar@PLT
-       addl    $8, %esp
-       .cfi_def_cfa_offset 8
+       addl    $4, %esp
+       .cfi_def_cfa_offset 12
        popl    %ebx
        .cfi_restore 3
+       .cfi_def_cfa_offset 8
+       popl    %esi
+       .cfi_restore 6
        .cfi_def_cfa_offset 4
        ret
       .cfi_endproc

Here, the register allocator makes a bad decision (load the got into %esi
rather than %ebx, both are call saved registers, but we need it in %ebx), and
nothing after LRA fixes it up (postreload, etc.).

Can the problematic commit be reverted and all these issues analyzed and fixed
before it is reapplied?


^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2014-11-25 21:08 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-14 12:31 [Bug target/63534] New: [5 Regression] Bootstrap failure on x86_64/i686-linux jakub at gcc dot gnu.org
2014-10-14 12:46 ` [Bug target/63534] " rguenth at gcc dot gnu.org
2014-10-14 13:20 ` evstupac at gmail dot com
2014-10-14 13:50 ` jakub at gcc dot gnu.org
2014-10-14 14:20 ` evstupac at gmail dot com
2014-10-14 14:56 ` jakub at gcc dot gnu.org
2014-10-14 16:27 ` iverbin at gcc dot gnu.org
2014-10-14 17:18 ` law at redhat dot com
2014-10-15  7:31 ` jakub at gcc dot gnu.org
2014-10-15  8:22 ` dominiq at lps dot ens.fr
2014-10-15 16:07 ` evstupac at gmail dot com
2014-10-15 16:18 ` vmakarov at gcc dot gnu.org
2014-10-15 16:30 ` evstupac at gmail dot com
2014-10-15 18:13 ` dominiq at lps dot ens.fr
2014-10-16 11:32 ` evstupac at gmail dot com
2014-10-16 12:33 ` dominiq at lps dot ens.fr
2014-10-16 14:40 ` iains at gcc dot gnu.org
2014-10-16 15:33 ` dominiq at lps dot ens.fr
2014-10-16 19:07 ` iains at gcc dot gnu.org
2014-10-16 20:59 ` izamyatin at gmail dot com
2014-10-16 23:54 ` iains at gcc dot gnu.org
2014-10-17 12:08 ` evstupac at gmail dot com
2014-10-17 12:55 ` iains at gcc dot gnu.org
2014-10-17 12:57 ` iains at gcc dot gnu.org
2014-10-17 13:48 ` evstupac at gmail dot com
2014-10-17 15:06 ` dominiq at lps dot ens.fr
2014-10-17 16:56 ` law at redhat dot com
2014-10-17 17:05 ` iains at gcc dot gnu.org
2014-10-20 10:17 ` evstupac at gmail dot com
2014-10-20 10:18 ` evstupac at gmail dot com
2014-10-21 16:21 ` evstupac at gmail dot com
2014-10-22 20:36 ` iains at gcc dot gnu.org
2014-10-22 20:51 ` evstupac at gmail dot com
2014-10-23 16:54 ` iverbin at gcc dot gnu.org
2014-10-24 14:17 ` ro at gcc dot gnu.org
2014-10-24 14:35 ` evstupac at gmail dot com
2014-10-24 15:26 ` ro at CeBiTec dot Uni-Bielefeld.DE
2014-10-24 15:46 ` evstupac at gmail dot com
2014-10-24 16:37 ` law at redhat dot com
2014-10-24 17:29 ` ro at CeBiTec dot Uni-Bielefeld.DE
2014-10-27 10:04 ` dominiq at lps dot ens.fr
2014-10-28 14:32 ` izamyatin at gmail dot com
2014-10-29 22:09 ` dominiq at lps dot ens.fr
2014-10-30  4:44 ` law at redhat dot com
2014-10-31 13:37 ` ienkovich at gcc dot gnu.org
2014-11-06 22:16 ` howarth at bromo dot med.uc.edu
2014-11-06 22:41 ` evstupac at gmail dot com
2014-11-07  0:00 ` evstupac at gmail dot com
2014-11-07  1:18 ` howarth at bromo dot med.uc.edu
2014-11-07  9:52 ` marxin at gcc dot gnu.org
2014-11-07 11:46 ` howarth at bromo dot med.uc.edu
2014-11-07 13:52 ` howarth at bromo dot med.uc.edu
2014-11-07 14:15 ` howarth at bromo dot med.uc.edu
2014-11-07 14:49 ` dominiq at lps dot ens.fr
2014-11-07 15:20 ` howarth at bromo dot med.uc.edu
2014-11-07 20:43 ` kyukhin at gcc dot gnu.org
2014-11-11 10:13 ` fxcoudert at gcc dot gnu.org
2014-11-11 12:15 ` izamyatin at gmail dot com
2014-11-11 12:21 ` fxcoudert at gcc dot gnu.org
2014-11-11 12:39 ` dominiq at lps dot ens.fr
2014-11-20 11:22 ` fxcoudert at gcc dot gnu.org
2014-11-20 11:22 ` fxcoudert at gcc dot gnu.org
2014-11-25 21:08 ` hjl at gcc dot gnu.org

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