https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80345
Bug ID: 80345 Summary: ICE in rewrite_use_nonlinear_expr with -O2 Product: gcc Version: 6.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: krisk0.2017.02.27 at protonmail dot com Target Milestone: --- The bug looks like #68021. But #68021 has been fixed Feb 2016 and gcc-6.3 is dated Dec 2016, so this bug is NOT a duplicate. * the exact version of GCC gcc version 6.3.0 (Gentoo 6.3.0 p1.0) 4.9.3 5.3 5.4 affected, too. clang 3.7.1 compiles fine. * the system type Gentoo Linux on amd64 * the options given when GCC was configured/built; COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/6.3.0/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/6.3.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/portage/sys-devel/gcc-6.3.0/work/gcc-6.3.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/6.3.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.3.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.3.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.3.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/6.3.0/python --enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 6.3.0 p1.0' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --disable-libquadmath --enable-lto --without-isl --enable-libsanitizer --disable-default-pie --disable-default-ssp Thread model: posix gcc version 6.3.0 (Gentoo 6.3.0 p1.0) * the complete command line that triggers the bug; x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fPIC -I/usr/lib64/python2.7/site-packages/sage/ext -I/usr/lib64/python2.7/site-packages -I/usr/lib64/python2.7/site-packages/cysignals -I/usr/include/python2.7 -c flint.c -o /tmp/portage/dev-python/python-sage-flint-20150625-r0/work/razin-20150625-r0/flint.binding-python2_7/temp.linux-x86_64-2.7/flint.o * the compiler output (error messages, warnings, etc.); and the preprocessed file (*.i*) that triggers the bug In file included from flint.c:483:0: C/fmpz_mat/det_suspected_zero.c: In function 'det_divisor_count_y': C/fmpz_mat/det_suspected_zero.c:180:33: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] const mp_limb_t** const m_row=m->rows; ^ In file included from flint.c:489:0: C/fmpz_mat/Hadamard_Cramer.c: In function 'hadamard_2arg': C/fmpz_mat/Hadamard_Cramer.c:127:27: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] const fmpz** const rows=m->rows; ^ In file included from flint.c:492:0: C/nmod_mat/det_mod_pk.c: In function 'nmod_mat_det_dim4': C/nmod_mat/det_mod_pk.c:122:32: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] const mp_limb_t** const rows=M->rows; ^ C/nmod_mat/det_mod_pk.c: In function 'nmod_mat_det_dim4_SE': C/nmod_mat/det_mod_pk.c:142:32: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] const mp_limb_t** const rows=M->rows; ^ C/nmod_mat/det_mod_pk.c: In function 'nmod_mat_det_dim3': C/nmod_mat/det_mod_pk.c:168:32: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] const mp_limb_t** const rows=A->rows; ^ In file included from flint.c:496:0: C/nmod_mat/transpose_square_tgt_virgin.c: In function 'nmod_mat_transpose_square_tgt_virgin': C/nmod_mat/transpose_square_tgt_virgin.c:11:36: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] const mp_limb_t** const sou_rows=sou->rows; ^ In file included from flint.c:491:0: C/tmod_mat/invert_square.c: In function 'tmod_mat_invert_transpose': C/tmod_mat/invert_square.c:226:1: internal compiler error: in rewrite_use_nonlinear_expr, at tree-ssa-loop-ivopts.c:6448 tmod_mat_invert_transpose(tmod_mat_t R, const tmod_mat_t S) ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://bugs.gentoo.org/> for instructions. error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1 For preprocessed source, see attached flint.i I tried to separately compile my invert_square.c and succeeded (had to add some #include).