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

            Bug ID: 78575
           Summary: [7 Regression] ICE: in trunc_int_for_mode, at
                    explow.c:55 with -O2 -g
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu
             Build: x86_64-pc-linux-gnu

Created attachment 40184
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40184&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O2 -g testcase.c -Wno-psabi
testcase.c: In function 'foo':
testcase.c:13:1: internal compiler error: in trunc_int_for_mode, at explow.c:55
 }
 ^
0x900b60 trunc_int_for_mode(long, machine_mode)
        /repo/gcc-trunk/gcc/explow.c:54
0x8f0bf8 gen_int_mode(long, machine_mode)
        /repo/gcc-trunk/gcc/emit-rtl.c:495
0xc75475 simplify_binary_operation_1
        /repo/gcc-trunk/gcc/simplify-rtx.c:2399
0xc7c03d simplify_binary_operation(rtx_code, machine_mode, rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/simplify-rtx.c:2068
0xc7fd98 simplify_const_relational_operation(rtx_code, machine_mode, rtx_def*,
rtx_def*)
        /repo/gcc-trunk/gcc/simplify-rtx.c:5022
0xc8074c simplify_relational_operation(rtx_code, machine_mode, machine_mode,
rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/simplify-rtx.c:4578
0x84da11 cselib_expand_value_rtx_1
        /repo/gcc-trunk/gcc/cselib.c:1823
0x84e71e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        /repo/gcc-trunk/gcc/cselib.c:1530
0xf8b7dd vt_expand_var_loc_chain
        /repo/gcc-trunk/gcc/var-tracking.c:8326
0xf8b7dd vt_expand_loc_callback
        /repo/gcc-trunk/gcc/var-tracking.c:8488
0x84d7ea cselib_expand_value_rtx_1
        /repo/gcc-trunk/gcc/cselib.c:1684
0x84e71e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        /repo/gcc-trunk/gcc/cselib.c:1530
0xf8b7dd vt_expand_var_loc_chain
        /repo/gcc-trunk/gcc/var-tracking.c:8326
0xf8b7dd vt_expand_loc_callback
        /repo/gcc-trunk/gcc/var-tracking.c:8488
0x84d48a cselib_expand_value_rtx_1
        /repo/gcc-trunk/gcc/cselib.c:1722
0x84e71e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        /repo/gcc-trunk/gcc/cselib.c:1530
0xf8b7dd vt_expand_var_loc_chain
        /repo/gcc-trunk/gcc/var-tracking.c:8326
0xf8b7dd vt_expand_loc_callback
        /repo/gcc-trunk/gcc/var-tracking.c:8488
0x84d7ea cselib_expand_value_rtx_1
        /repo/gcc-trunk/gcc/cselib.c:1684
0x84e71e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        /repo/gcc-trunk/gcc/cselib.c:1530
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-242931-checking-yes-rtl-df-extra-nobootstrap-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --without-cloog --without-ppl --without-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-242931-checking-yes-rtl-df-extra-nobootstrap-nographite-amd64
Thread model: posix
gcc version 7.0.0 20161128 (experimental) (GCC) 

Tested revisions:
trunk r242931 - FAIL
6-branch r242029 - OK

Reply via email to