http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58079
Bug ID: 58079 Summary: internal compiler error: in do_SUBST, at combine.c:711 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: JuergenUrban at gmx dot de Created attachment 30608 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30608&action=edit dvd_demux.i created from dvd_demux.c An internal compiler error in do_SUBST happens. The comment in the source code above the gcc_assert() is: "Sanity check that we're replacing oldval with a CONST_INT that is a valid sign-extension for the original mode.". The error happens when compiling the DVB modules in linux-2.6.35.4 for Playstation 2 (mips). I used GCC r201473 from SVN. The error is also in r200155. I used mips64r5900el, but it doesn't seem to be related to this. This also happens when changing the ABI or the CPU type (still mips). Not using the parameters "-Os", "-mno-abicalls" or "-mlong-calls" fix the problem. I tried to create a small test case, but changing the source code and keeping the error is difficult. I stripped the source code as far as possible and attached the preprocessor output. mips64r5900el-linux-gnu-gcc (GCC) 4.9.0 20130804 (experimental) I didn't changed the GCC source code, even if the following output contains the word "patched" in the path. The error happens when executing the following command: LANG=C mips64r5900el-linux-gnu-gcc -march=r4000 -mtune=r4000 -Os -mabi=32 -G 0 -mno-abicalls -msoft-float -mlong-calls -c -o /tmp/test.o dvb_demux.i dvb_demux.c: In function 'dvb_dmx_swfilter_packets': dvb_demux.c:214:1: internal compiler error: in do_SUBST, at combine.c:711 } ^ 0xbe60c4 do_SUBST /home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:710 0xbf5db9 combine_simplify_rtx /home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:5813 0xbf710f subst /home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:5149 0xbf6eaf subst /home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:5094 0xbf6eaf subst /home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:5094 0xbf83c8 try_combine /home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:3142 0xbfd4a0 combine_instructions /home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:1368 0xbfd4a0 rest_of_handle_combine /home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:13826 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.