This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/61278] New: ICE with LTO (lto-wrapper failed) on x86_64-linux-gnu in 64-bit mode


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

            Bug ID: 61278
           Summary: ICE with LTO (lto-wrapper failed) on x86_64-linux-gnu
                    in 64-bit mode
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The current gcc trunk produces an ICE on the following code when using LTO on
x86_64-linux-gnu in 64-bit mode (but not 32-bit). 

This is a regression from 4.9.x. 

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.10.0 20140521 (experimental) [trunk revision 210675] (GCC) 
$ 
$ gcc-4.9.0 -flto -O0 -c foo.c
$ gcc-4.9.0 -flto -O1 -c main.c
$ gcc-4.9.0 -flto -O1 foo.o main.o
$ a.out
$ 
$ gcc-trunk -O0 -c foo.c
$ gcc-trunk -O1 -c main.c
$ gcc-trunk -O1 foo.o main.o
$ a.out
$ 
$ gcc-trunk -flto -O0 -c foo.c
$ gcc-trunk -flto -O1 -c main.c
$ gcc-trunk -flto -O1 foo.o main.o
foo.c: In function âfooâ:
foo.c:26:1: internal compiler error: Segmentation fault
 }
 ^
0x8c28df crash_signal
    ../../gcc-trunk/gcc/toplev.c:337
0x513b40 bitmap_clear
    ../../gcc-trunk/gcc/bitmap.c:311
0x513b40 bitmap_copy(bitmap_head*, bitmap_head const*)
    ../../gcc-trunk/gcc/bitmap.c:534
0x89a7f7 move_insn_for_shrink_wrap
    ../../gcc-trunk/gcc/shrink-wrap.c:209
0x89a7f7 prepare_shrink_wrap(basic_block_def*)
    ../../gcc-trunk/gcc/shrink-wrap.c:337
0x89abeb try_shrink_wrapping(edge_def**, edge_def*, bitmap_head*, rtx_def*)
    ../../gcc-trunk/gcc/shrink-wrap.c:463
0x6c5a51 thread_prologue_and_epilogue_insns
    ../../gcc-trunk/gcc/function.c:5661
0x6c5a51 rest_of_handle_thread_prologue_and_epilogue
    ../../gcc-trunk/gcc/function.c:6213
0x6c5a51 execute
    ../../gcc-trunk/gcc/function.c:6252
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: gcc-trunk returned 1 exit status
/usr/bin/ld: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
$ 
$ 
$ cat foo.c
static unsigned int
fn1 (int p1, int p2)
{
  return 0;
}

char a, b, c; 

char
foo (char *p)
{
  int i;
  for (b = 1 ; b > 0; b++) 
    {
      for (i = 0; i < 2; i++)
    ;
      for (a = 1; a > 0; a++)
    {
      char d[1] = { 0 };
      if (*p)
        break;
      c ^= fn1 (fn1 (fn1 (0, 0), 0), 0);
    }
    }
  return 0;
}
$ cat main.c
extern char foo (char *); 

char d; 

int
main ()
{
  foo (&d); 
  return 0;
}
$

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]