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 tree-optimization/23858] New: ICE: Segmentation fault calling fold-const recursively


When I compile the small program below using the actual snapshot 
(20050909) I get a segfault. This segfault occurs whith all the gcc41 snapshots 
I have, my oldest is gcc-4.1-20050604, gcc40 does not segfault.

Michael Cieslinski


<file tc.c>

typedef struct Data
{
    unsigned int Table [256];
} S1;

void make_crc_table (S1* ptr)
{
    unsigned int u;
    int i, j;
    for (i = 0; i<256; i++)
    {
        u = (unsigned int) i;
        for (j=0; j<8; j++)
            if (u & 1) u = 0xedb88320U ^ (u >> 1);
        ptr->Table[i] = u;
    }
}


gcc41o -c -O3 -ftree-vectorize tc.c
gcc41o: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.


g++41o -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.1-20050909/configure --prefix=/usr/local/gcc41o --
program-suffix=41o --with-arch=opteron --enable-languages=c,c++ --enable-
checking
Thread model: posix
gcc version 4.1.0 20050909 (experimental)


gdb --args /usr/local/gcc41o/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0/cc1 -
quiet -v tc.c -quiet -dumpbase tc.c -march=opteron -auxbase tc -O3 -version -
ftree-vectorize
-o /tmp/cc7cEI1I.s
GNU gdb Red Hat Linux (6.1post-1.20040607.33rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db 
library "/lib64/tls/libthread_db.so.1".

(gdb) r
Starting program: /usr/local/gcc41o/libexec/gcc/x86_64-unknown-linux-
gnu/4.1.0/cc1 -quiet -v tc.c -quiet -dumpbase tc.c -march=opteron -auxbase tc -
O3 -version -ftree-vectorize -o /tmp/cc7cEI1I.s
ignoring nonexistent directory "/usr/local/gcc41o/lib/gcc/x86_64-unknown-linux-
gnu/4.1.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/gcc41o/include
 /usr/local/gcc41o/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/include
 /usr/include
End of search list.
GNU C version 4.1.0 20050909 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.1.0 20050909 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: da6b2f2e2233d028468e7d03ba644b6c

Program received signal SIGSEGV, Segmentation fault.
operand_equal_for_comparison_p (arg0=0x2a95589b70, arg1=0x2a9574b600, 
other=0x2a95589b70) at ../../gcc-4.1-20050909/gcc/fold-const.c:2669
2669      if (operand_equal_p (arg0, arg1, 0))
(gdb) where
#0  operand_equal_for_comparison_p (arg0=0x2a95589b70, arg1=0x2a9574b600, 
other=0x2a95589b70) at ../../gcc-4.1-20050909/gcc/fold-const.c:2669
#1  0x00000000005ddc84 in fold_cond_expr_with_comparison (type=0x2a95597580, 
arg0=0x2a95766cd0, arg1=Variable "arg1" is not available.
) at ../../gcc-4.1-20050909/gcc/fold-const.c:4378
#2  0x00000000005c10de in fold_ternary (code=Variable "code" is not available.
) at ../../gcc-4.1-20050909/gcc/fold-const.c:9987
#3  0x00000000005c1b41 in fold_build3_stat (code=COND_EXPR, type=0x2a95597580, 
op0=0x2a95766cd0, op1=0x2a95589b70, op2=0x2a9574b600) at ../../gcc-4.1-
20050909/gcc/fold-const.c:10547
#4  0x00000000005c10de in fold_ternary (code=Variable "code" is not available.
) at ../../gcc-4.1-20050909/gcc/fold-const.c:9987
#5  0x00000000005c1b41 in fold_build3_stat (code=COND_EXPR, type=0x2a95597580, 
op0=0x2a95766cd0, op1=0x2a95589b70, op2=0x2a9574b600) at ../../gcc-4.1-
20050909/gcc/fold-const.c:10547
#6  0x00000000005c10de in fold_ternary (code=Variable "code" is not available.
) at ../../gcc-4.1-20050909/gcc/fold-const.c:9987
#7  0x00000000005c1b41 in fold_build3_stat (code=COND_EXPR, type=0x2a95597580, 
op0=0x2a95766cd0, op1=0x2a95589b70, op2=0x2a9574b600) at ../../gcc-4.1-
20050909/gcc/fold-const.c:10547
#8  0x00000000005c10de in fold_ternary (code=Variable "code" is not available.
) at ../../gcc-4.1-20050909/gcc/fold-const.c:9987
#9  0x00000000005c1b41 in fold_build3_stat (code=COND_EXPR, type=0x2a95597580, 
op0=0x2a95766cd0, op1=0x2a95589b70, op2=0x2a9574b600) at ../../gcc-4.1-
20050909/gcc/fold-const.c:10547
#10 0x00000000005c10de in fold_ternary (code=Variable "code" is not available.
) at ../../gcc-4.1-20050909/gcc/fold-const.c:9987
#11 0x00000000005c1b41 in fold_build3_stat (code=COND_EXPR, type=0x2a95597580, 
op0=0x2a95766cd0, op1=0x2a95589b70, op2=0x2a9574b600) at ../../gcc-4.1-
20050909/gcc/fold-const.c:10547
#12 0x00000000005c10de in fold_ternary (code=Variable "code" is not available.
) at ../../gcc-4.1-20050909/gcc/fold-const.c:9987

-- 
           Summary: ICE: Segmentation fault calling fold-const recursively
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: micis at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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