$ gcc -v -save-temps -DHAVE_CONFIG_H -I. -g -Wall -O2 -c conf.c Reading specs from /usr/lib/gcc/mips-linux/3.4.4/specs Configured with: ../src/configure -v --enable-languages=c,c++,f77,pascal,objc,ada,treelang --prefix=/usr --libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --program-suffix=-3.4 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --disable-werror mips-linux Thread model: posix gcc version 3.4.4 20041218 (prerelease) (Debian 3.4.3-6) /usr/lib/gcc/mips-linux/3.4.4/cc1 -E -quiet -v -I. -I. -I. -DHAVE_CONFIG_H conf.c -Wall -Wall -fworking-directory -O2 -o conf.i ignoring nonexistent directory "/usr/lib/gcc/mips-linux/3.4.4/../../../../mips-linux/include" ignoring duplicate directory "." ignoring duplicate directory "." #include "..." search starts here: #include <...> search starts here: . /usr/local/include /usr/lib/gcc/mips-linux/3.4.4/include /usr/include End of search list. /usr/lib/gcc/mips-linux/3.4.4/cc1 -fpreprocessed conf.i -quiet -dumpbase conf.c -auxbase conf -g -O2 -Wall -Wall -version -o conf.s GNU C version 3.4.4 20041218 (prerelease) (Debian 3.4.3-6) (mips-linux) compiled by GNU C version 3.4.4 20041218 (prerelease) (Debian 3.4.3-6). GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31962 conf.c: In function `cdcdrc_manual_configuration': conf.c:193: internal compiler error: in change_address_1, at emit-rtl.c:1886 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. For Debian GNU/Linux specific bug reporting instructions, see <URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.
Created attachment 8447 [details] preprocessed source from the debian package 'cdcd'
*** Bug 20619 has been marked as a duplicate of this bug. ***
*** Bug 20620 has been marked as a duplicate of this bug. ***
(In reply to comment #0) ICE appears only on the MIPS arch using 3.4.4 It doesn't appear when using 3.3.5, or on x86 using either versions.
I cannot reproduce this with a cross compiler to mips-linux with the version of "3.4.4 20050202".
It still appears in the latest native mips compiler. $ gcc --version gcc (GCC) 3.4.4 20050314 (prerelease) (Debian 3.4.3-12) Have you got binaries for the cross compiler you're using?
(In reply to comment #6) > It still appears in the latest native mips compiler. > Have you got binaries for the cross compiler you're using? Well considering it is a cross from powerpc-darwin, I really doubt it would be useful to you.
Confirmed. This is a target-specific bug.
Created attachment 9199 [details] Reduced testcase This reduced testcase fails in the same way if compiled with -O2.
Created attachment 9200 [details] Proposed patch. Here's a prototype patch. I've confirmed that it fixes the testcase but it will be a while before I can do a full bootstrap and regression test.
Subject: Bug 20621 CVSROOT: /cvs/gcc Module name: gcc Changes by: rsandifo@gcc.gnu.org 2005-07-31 08:30:16 Modified files: gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.c-torture/execute: pr20621-1.c Log message: PR target/20621 * gcc.c-torture/execute/pr20621-1.c: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5859&r2=1.5860 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr20621-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
Subject: Bug 20621 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: rsandifo@gcc.gnu.org 2005-07-31 08:31:38 Modified files: gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.c-torture/execute: pr20621-1.c Log message: PR target/20621 * gcc.c-torture/execute/pr20621-1.c: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.312&r2=1.5084.2.313 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr20621-1.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
Subject: Bug 20621 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: rsandifo@gcc.gnu.org 2005-07-31 08:35:16 Modified files: gcc : ChangeLog gcc/testsuite : ChangeLog gcc/config/mips: mips-protos.h mips.c mips.md Added files: gcc/testsuite/gcc.c-torture/execute: pr20621-1.c Log message: PR target/20621 Backport from mainline: 2004-08-01 Richard Sandiford <rsandifo@redhat.com> * config/mips/mips.md (cprestore): Provide two alternatives, one for an in-range offset and one for an out-of-range offset. Wrap the latter in .set macro/.set nomacro if it's inside a .set nomacro block. 2004-08-01 Richard Sandiford <rsandifo@redhat.com> * config/mips/mips-protos.h (mips_gp_save_slot): Remove. (mips_restore_gp): Declare. * config/mips/mips.c (mips_add_offset): Add a scratch register argument. Reimplement in rtl only, reusing MIPS16 logic from mips_output_mi_thunk. (mips_legitimize_address, mips_legitimize_const_move): Adjust calls to mips_add_offset. (mips_gp_save_slot): Delete. (mips_restore_gp): New function. (mips_set_return_address, mips_output_mi_thunk): Use mips_add_offset. * config/mips/mips.md (exception_receiver): Turn into a define_insn_and_split. Use mips_restore_gp to do the split. (call_internal, call_value_internal, call_value_multiple_internal): Use mips_restore_gp to restore $gp. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.892&r2=2.2326.2.893 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.415&r2=1.3389.2.416 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr20621-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/mips-protos.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.59.4.4&r2=1.59.4.5 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/mips.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.362.4.17&r2=1.362.4.18 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/mips.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.211.4.11&r2=1.211.4.12
Patch applied to 3.4 branch. Testcase also applied to 4.0 and mainline.