[Bug rtl-optimization/69764] New: ICE on x86_64-linux-gnu at -O0 (in decompose, at rtl.h:2107)

chengniansun at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Feb 11 09:19:00 GMT 2016


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

            Bug ID: 69764
           Summary: ICE on x86_64-linux-gnu at -O0 (in decompose, at
                    rtl.h:2107)
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chengniansun at gmail dot com
  Target Milestone: ---

The following code crashes the trunk in both 32-bit and 64-bit modes. gcc-5.1
is fine with the code. 


$: 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/6.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 : (reconfigured)
../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap : (reconfigured)
../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 6.0.0 20160211 (experimental) [trunk revision 233315] (GCC) 
$: gcc-trunk -w small.c
small.c: In function ‘fn1’:
small.c:1:29: internal compiler error: in decompose, at rtl.h:2107
 void fn1() { unsigned short a = a >> ~8; }
                             ^
0x8274ea wi::int_traits<std::pair<rtx_def*, machine_mode> >::decompose(long*,
unsigned int, std::pair<rtx_def*, machine_mode> const&)
        ../../gcc-source-trunk/gcc/rtl.h:2105
0x8274ea wide_int_ref_storage<std::pair<rtx_def*, machine_mode> >
        ../../gcc-source-trunk/gcc/wide-int.h:936
0x8274ea generic_wide_int<std::pair<rtx_def*, machine_mode> >
        ../../gcc-source-trunk/gcc/wide-int.h:714
0x8274ea convert_modes(machine_mode, machine_mode, rtx_def*, int)
        ../../gcc-source-trunk/gcc/expr.c:697
0xa5897c expand_binop_directly
        ../../gcc-source-trunk/gcc/optabs.c:1026
0xa56785 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*,
int, optab_methods)
        ../../gcc-source-trunk/gcc/optabs.c:1133
0x80c9e4 expand_shift_1
        ../../gcc-source-trunk/gcc/expmed.c:2458
0x834473 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        ../../gcc-source-trunk/gcc/expr.c:9029
0x71e741 expand_gimple_stmt_1
        ../../gcc-source-trunk/gcc/cfgexpand.c:3642
0x71e741 expand_gimple_stmt
        ../../gcc-source-trunk/gcc/cfgexpand.c:3702
0x72098a expand_gimple_basic_block
        ../../gcc-source-trunk/gcc/cfgexpand.c:5708
0x726056 execute
        ../../gcc-source-trunk/gcc/cfgexpand.c:6323
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
void fn1() { unsigned short a = a >> ~8; }


More information about the Gcc-bugs mailing list