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

            Bug ID: 68129
           Summary: [5/6 Regression] ICE: in
                    simplify_const_binary_operation, at
                    simplify-rtx.c:3961 (TARGET_SUPPORTS_WIDE_INT == 0)
                    with -fno-split-wide-types @ aarch64
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---

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

Compiler output:
$ cc1 -O -fno-split-wide-types testcase.c
testcase.c: In function 'foo':
testcase.c:7:1: internal compiler error: in simplify_const_binary_operation, at
simplify-rtx.c:3961
 }
 ^
0xae6b38 simplify_const_binary_operation(rtx_code, machine_mode, rtx_def*,
rtx_def*)
        /mnt/svn/gcc-trunk/gcc/simplify-rtx.c:3961
0xae2b0f simplify_binary_operation(rtx_code, machine_mode, rtx_def*, rtx_def*)
        /mnt/svn/gcc-trunk/gcc/simplify-rtx.c:2001
0xae7a2a simplify_gen_binary(rtx_code, machine_mode, rtx_def*, rtx_def*)
        /mnt/svn/gcc-trunk/gcc/simplify-rtx.c:196
0x107c624 expand_field_assignment
        /mnt/svn/gcc-trunk/gcc/combine.c:7251
0x108d341 can_combine_p
        /mnt/svn/gcc-trunk/gcc/combine.c:1921
0x10a80ae try_combine
        /mnt/svn/gcc-trunk/gcc/combine.c:2972
0x10b41ed combine_instructions
        /mnt/svn/gcc-trunk/gcc/combine.c:1278
0x10b41ed rest_of_handle_combine
        /mnt/svn/gcc-trunk/gcc/combine.c:14289
0x10b41ed execute
        /mnt/svn/gcc-trunk/gcc/combine.c:14332
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.


$ xgcc -v                                 
Reading specs from
/home/smatz/build-trunk-229293-lto-fortran-checking-yes-rtl-df-disable-bootstrap-disable-graphite-aarch64/gcc/specs
COLLECT_GCC=/home/smatz/build-trunk-229293-lto-fortran-checking-yes-rtl-df-disable-bootstrap-disable-graphite-aarch64/gcc/xgcc
COLLECT_LTO_WRAPPER=/home/smatz/build-trunk-229293-lto-fortran-checking-yes-rtl-df-disable-bootstrap-disable-graphite-aarch64/gcc/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /mnt/svn/gcc-trunk//configure --disable-bootstrap
--enable-checking=yes,rtl,df --enable-languages=c,c++
--prefix=/mnt/svn/gcc-trunk//binary-229293-lto-fortran-checking-yes-rtl-df-disable-bootstrap-disable-graphite-aarch64/
--without-cloog --without-ppl --without-isl --host=x86_64-pc-linux-gnu
--target=aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--with-sysroot=/home/aarch64-chroot
--with-as=/usr/libexec/gcc/aarch64-unknown-linux-gnu/as
--with-ld=/usr/libexec/gcc/aarch64-unknown-linux-gnu/ld
Thread model: posix
gcc version 6.0.0 20151025 (experimental) (GCC) 

The failing assert is:
#if TARGET_SUPPORTS_WIDE_INT == 0
      /* This assert keeps the simplification from producing a result
         that cannot be represented in a CONST_DOUBLE but a lot of
         upstream callers expect that this function never fails to
         simplify something and so you if you added this to the test
         above the code would die later anyway.  If this assert
         happens, you just need to make the port support wide int.  */
      gcc_assert (width <= HOST_BITS_PER_DOUBLE_INT);
#endif

Tested revisions:
r229293 - ICE
5-branch r229292 - ICE
4_9-branch r229291 - OK
4_8-branch r224828 - OK

Reply via email to