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

           Summary: Segfault in reg_nonzero_bits_for_combine
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: rmansfi...@qnx.com


$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: i686-pc-linux-gnu
Configured with: ../configure --disable-bootstrap --enable-languages=c
Thread model: posix
gcc version 4.6.0 20101028 (experimental) [trunk revision 166029] (GCC) 

$ ./xgcc -B.   t.c -O3 -Wall  -funroll-all-loops -c -march=i386
xgcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

$ gdb --args ./cc1 -quiet -nostdinc  t.c -O3 -Wall -version -funroll-all-loops
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ryan/gnu/gcc/trunk/tmp/gcc/cc1...done.
Breakpoint 1 at 0x81f2b76: file ../../gcc/diagnostic.c, line 881.
Breakpoint 2 at 0x81f2b03: file ../../gcc/diagnostic.c, line 820.
Breakpoint 3 at 0x80b07c8
Breakpoint 4 at 0x80afa98
(gdb) r
Starting program: /home/ryan/gnu/gcc/trunk/tmp/gcc/cc1 -quiet -nostdinc t.c -O3
-Wall -version -funroll-all-loops
GNU C (GCC) version 4.6.0 20101028 (experimental) [trunk revision 166029]
(i686-pc-linux-gnu)
    compiled by GNU C version 4.4.5, GMP version 4.3.2, MPFR version 3.0.0-p3,
MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.6.0 20101028 (experimental) [trunk revision 166029]
(i686-pc-linux-gnu)
    compiled by GNU C version 4.4.5, GMP version 4.3.2, MPFR version 3.0.0-p3,
MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: bc9857b210e225a4f4bf75c19a868300

Program received signal SIGSEGV, Segmentation fault.
0x087ed03f in reg_nonzero_bits_for_combine (x=0xb7786090, mode=SImode, 
    known_x=0x0, known_mode=VOIDmode, known_ret=0, nonzero=0xbf60007c)
    at ../../gcc/combine.c:9406
9406      tem = get_last_value (x);
(gdb) bt
#0  0x087ed03f in reg_nonzero_bits_for_combine (x=0xb7786090, mode=SImode, 
    known_x=0x0, known_mode=VOIDmode, known_ret=0, nonzero=0xbf60007c)
    at ../../gcc/combine.c:9406
#1  0x083ecb28 in nonzero_bits1 (x=0xb7786090, mode=SImode, 
    known_x=<value optimized out>, known_mode=VOIDmode, known_ret=0)
    at ../../gcc/rtlanal.c:3791
#2  0x083ecfc6 in num_sign_bit_copies1 (x=0xb7786090, 
    mode=<value optimized out>, known_x=<value optimized out>, 
    known_mode=VOIDmode, known_ret=0) at ../../gcc/rtlanal.c:4627
#3  0x087eefbf in if_then_else_cond (x=0xb7786090, 
    ptrue=<value optimized out>, pfalse=<value optimized out>)
    at ../../gcc/combine.c:8653
#4  0x087eee7e in if_then_else_cond (x=0xb76bad50, 
    ptrue=<value optimized out>, pfalse=<value optimized out>)
    at ../../gcc/combine.c:8507
#5  0x087eee7e in if_then_else_cond (x=0xb76bad74, 
    ptrue=<value optimized out>, pfalse=<value optimized out>)
    at ../../gcc/combine.c:8507
#6  0x087ef08e in if_then_else_cond (x=0xb7698a98, 
    ptrue=<value optimized out>, pfalse=<value optimized out>)
    at ../../gcc/combine.c:8620
#7  0x087ef01e in if_then_else_cond (x=0xb76a1368, 
    ptrue=<value optimized out>, pfalse=<value optimized out>)

Reply via email to