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

            Bug ID: 82675
           Summary: ICE in duplicate_loop_to_header_edge at
                    gcc/cfgloopmanip.c:1207
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

After we've added sbitmap checking, we hit:

$ cat ice.i

char a[1];
int *b;

int e();

void c ()
{
  char *d = a;
  while (*b && d < a + 300)
    *d++ = e ();
}


$ ./xgcc -B. ~/Programming/testcases/ice.i  -fno-tree-loop-optimize -O1
-funroll-all-loops
during RTL pass: loop2_unroll
/home/marxin/Programming/testcases/ice.i: In function ā€˜c’:
/home/marxin/Programming/testcases/ice.i:11:1: internal compiler error: in
bitmap_check_index, at sbitmap.h:105
 }
 ^
0x75d239 bitmap_check_index
        ../../gcc/sbitmap.h:105
0x75d25c bitmap_bit_p
        ../../gcc/sbitmap.h:120
0x760500 duplicate_loop_to_header_edge(loop*, edge_def*, unsigned int,
simple_bitmap_def*, edge_def*, vec<edge_def*, va_heap, vl_ptr>*, int)
        ../../gcc/cfgloopmanip.c:1207
0xa1493e unroll_loop_constant_iterations
        ../../gcc/loop-unroll.c:554
0xa15610 unroll_loops(int)
        ../../gcc/loop-unroll.c:289
0xa0586f execute
        ../../gcc/loop-init.c:584

1207            scale_step[i - 1] = bitmap_bit_p (wont_exit, i)
(gdb) p *wont_exit
$1 = {n_bits = 5, size = 1, elms = {28}}
(gdb) p i
$2 = 5

Reply via email to