User account creation filtered due to spam.

Bug 20621 - ICE: in change_address_1, at emit-rtl.c:1886
Summary: ICE: in change_address_1, at emit-rtl.c:1886
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: 3.4.5
Assignee: rsandifo@gcc.gnu.org
URL:
Keywords: ice-on-valid-code
: 20619 20620 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-24 12:46 UTC by Laurence Darby
Modified: 2005-07-31 08:46 UTC (History)
1 user (show)

See Also:
Host:
Target: mips-linux
Build:
Known to work: 4.0.0 4.1.0
Known to fail: 3.4.4
Last reconfirmed: 2005-07-04 09:23:31


Attachments
preprocessed source from the debian package 'cdcd' (16.37 KB, application/bzip2)
2005-03-24 12:48 UTC, Laurence Darby
Details
Reduced testcase (73 bytes, text/plain)
2005-07-04 09:24 UTC, rsandifo@gcc.gnu.org
Details
Proposed patch. (1.91 KB, patch)
2005-07-04 09:26 UTC, rsandifo@gcc.gnu.org
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laurence Darby 2005-03-24 12:46:56 UTC
$ 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>.
Comment 1 Laurence Darby 2005-03-24 12:48:39 UTC
Created attachment 8447 [details]
preprocessed source from the debian package 'cdcd'
Comment 2 Laurence Darby 2005-03-24 12:50:17 UTC
*** Bug 20619 has been marked as a duplicate of this bug. ***
Comment 3 Laurence Darby 2005-03-24 12:50:48 UTC
*** Bug 20620 has been marked as a duplicate of this bug. ***
Comment 4 Laurence Darby 2005-03-24 13:56:36 UTC
(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.
Comment 5 Andrew Pinski 2005-03-24 15:07:41 UTC
I cannot reproduce this with a cross compiler to mips-linux with the version of "3.4.4 20050202".
Comment 6 Laurence Darby 2005-03-29 17:34:34 UTC
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?
Comment 7 Andrew Pinski 2005-03-29 19:32:22 UTC
(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.
Comment 8 rsandifo@gcc.gnu.org 2005-07-04 09:23:31 UTC
Confirmed.  This is a target-specific bug.
Comment 9 rsandifo@gcc.gnu.org 2005-07-04 09:24:59 UTC
Created attachment 9199 [details]
Reduced testcase

This reduced testcase fails in the same way if compiled with -O2.
Comment 10 rsandifo@gcc.gnu.org 2005-07-04 09:26:38 UTC
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.
Comment 11 CVS Commits 2005-07-31 08:30:21 UTC
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

Comment 12 CVS Commits 2005-07-31 08:31:42 UTC
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

Comment 13 CVS Commits 2005-07-31 08:35:20 UTC
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

Comment 14 rsandifo@gcc.gnu.org 2005-07-31 08:46:58 UTC
Patch applied to 3.4 branch.  Testcase also applied to 4.0 and mainline.