Bug 16357 - [3.4 Regression] ICE copying 7 bytes between extern char[]s
Summary: [3.4 Regression] ICE copying 7 bytes between extern char[]s
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.1
: P2 normal
Target Milestone: 3.4.2
Assignee: rsandifo@gcc.gnu.org
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-07-04 07:50 UTC by rsandifo@gcc.gnu.org
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: mipsisa64-elf
Build: i686-pc-linux-gnu
Known to work: 3.3.4 4.0.0
Known to fail: 3.4.1
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rsandifo@gcc.gnu.org 2004-07-04 07:50:11 UTC
Compiling the following:

-----------------------------------------------------------
extern char foo[], bar[];
void f (void) { memcpy (foo, bar, 7); }
-----------------------------------------------------------

with mipsisa64-elf causes an ICE:

-----------------------------------------------------------
/tmp/foo.c: In function `f':
/tmp/foo.c:2: error: PRINT_OPERAND, invalid operand for relocation
(const:DI (plus:DI (symbol_ref:DI ("bar") [flags 0x40] <var_decl 0x401c2e80 bar>)
        (const_int 6 [0x6])))
/tmp/foo.c:2: internal compiler error: in print_operand_reloc, at
config/mips/mips.c:5624
-----------------------------------------------------------

The problem is due to incorrect mode usage in mips_block_move_straight.
Testing a fix now.
Comment 1 CVS Commits 2004-07-05 06:37:17 UTC
Subject: Bug 16357

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rsandifo@gcc.gnu.org	2004-07-05 06:37:12

Modified files:
	gcc            : ChangeLog 
	gcc/config/mips: mips.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: 20040705-1.c 

Log message:
	PR target/16357
	* config/mips/mips.c (mips_block_move_straight): Pass BLKmode memrefs
	to mips_expand_unaligned_load, mips_expand_unaligned_store, and
	move_by_pieces.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4294&r2=2.4295
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/mips.c.diff?cvsroot=gcc&r1=1.423&r2=1.424
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3938&r2=1.3939
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/20040705-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 2 CVS Commits 2004-07-07 06:32:40 UTC
Subject: Bug 16357

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	rsandifo@gcc.gnu.org	2004-07-07 06:32:34

Modified files:
	gcc            : ChangeLog 
	gcc/config/mips: mips.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: 20040705-1.c 

Log message:
	PR target/16357
	* config/mips/mips.c (mips_block_move_straight): Pass BLKmode memrefs
	to mips_expand_unaligned_load, mips_expand_unaligned_store, and
	move_by_pieces.

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.534&r2=2.2326.2.535
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.14&r2=1.362.4.15
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.220&r2=1.3389.2.221
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/20040705-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1

Comment 3 rsandifo@gcc.gnu.org 2004-07-07 06:33:32 UTC
Fixed for 3.4.2.