[Bug tree-optimization/71398] New: ICE at -O3 in 32-bit and 64-bit mode on x86_64-linux-gnu (Segmentation fault, find_edge)

chengniansun at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Jun 3 10:17:00 GMT 2016


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

            Bug ID: 71398
           Summary: ICE at -O3 in 32-bit and 64-bit mode on
                    x86_64-linux-gnu (Segmentation fault, find_edge)
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chengniansun at gmail dot com
  Target Milestone: ---

$: gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160602 (experimental) [trunk revision 237029] (GCC) 
$: 
$: gcc-trunk -O3 -m32 small.c
small.c:1:16: warning: array ‘c’ assumed to have one element
 unsigned a, b, c[];
                ^
small.c: In function ‘fn1’:
small.c:3:6: internal compiler error: Segmentation fault
 void fn1() {
      ^~~
0xbbceaf crash_signal
        ../../gcc-source-trunk/gcc/toplev.c:333
0x7886a4 find_edge(basic_block_def*, basic_block_def*)
        ../../gcc-source-trunk/gcc/cfganal.c:506
0xd05831 unloop_loops
        ../../gcc-source-trunk/gcc/tree-ssa-loop-ivcanon.c:633
0xd08ae2 tree_unroll_loops_completely(bool, bool)
        ../../gcc-source-trunk/gcc/tree-ssa-loop-ivcanon.c:1379
0xd08c93 execute
        ../../gcc-source-trunk/gcc/tree-ssa-loop-ivcanon.c:1587
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.
$: 
$: cat small.c
unsigned a, b, c[];
void __assert_fail() __attribute__((__noreturn__));
void fn1() {
  int d;
  unsigned e;
  for (;;) {
    d = 0;
    for (; d <= 6; d++)
      c[d] || a ? 0 : __assert_fail();
    for (; e <= 5; e++)
      a = b;
  }
}

int main() {}
$:


More information about the Gcc-bugs mailing list