[Bug tree-optimization/82669] New: ICE at -Os on valid code on x86_64-linux-gnu: in bitmap_check_index, at sbitmap.h:105

helloqirun at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 23 03:27:00 GMT 2017


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

            Bug ID: 82669
           Summary: ICE at -Os on valid code on x86_64-linux-gnu: in
                    bitmap_check_index, at sbitmap.h:105
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: helloqirun at gmail dot com
  Target Milestone: ---

It happens at -Os and in 32-bit mode only.

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 8.0.0 20171022 (experimental) [trunk revision 253982] (GCC)






$ gcc-trunk -m32 -Os abc.c
during RTL pass: reload
abc.c: In function ‘fn1’:
abc.c:16:1: internal compiler error: in bitmap_check_index, at sbitmap.h:105
 }
 ^
0xb4a77b bitmap_check_index
        ../../gcc/gcc/sbitmap.h:105
0xb4a77b bitmap_set_bit
        ../../gcc/gcc/sbitmap.h:132
0xb4a77b remove_some_program_points_and_update_live_ranges
        ../../gcc/gcc/lra-lives.c:1082
0xb4a77b compress_live_ranges
        ../../gcc/gcc/lra-lives.c:1209
0xb4a77b lra_create_live_ranges_1
        ../../gcc/gcc/lra-lives.c:1357
0xb4a95f lra_create_live_ranges(bool, bool)
        ../../gcc/gcc/lra-lives.c:1369
0xb2d963 lra(_IO_FILE*)
        ../../gcc/gcc/lra.c:2428
0xae5781 do_reload
        ../../gcc/gcc/ira.c:5446
0xae5781 execute
        ../../gcc/gcc/ira.c:5630
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.



$ cat abc.c
int a, b;
void fn1() {
  for (;;) {
    int i, j;
    for (; i < 4; b++)
      for (; j < 8; a++)
        ;
    {
      for (; b;) {
        a = 0;
        for (;;)
          ;
      }
    }
  }
}


More information about the Gcc-bugs mailing list