Bug 39685 - ICE: in copyprop_hardreg_forward_1, at regrename.c:1603
Summary: ICE: in copyprop_hardreg_forward_1, at regrename.c:1603
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-08 04:55 UTC by M R Swami Reddy
Modified: 2011-03-22 20:25 UTC (History)
3 users (show)

See Also:
Host:
Target: crx-elf
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-04-08 11:01:38


Attachments
Bug testcase (2.50 KB, text/plain)
2009-04-08 05:09 UTC, M R Swami Reddy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M R Swami Reddy 2009-04-08 04:55:15 UTC
Compile the below testcase with -O3 -funroll-all-loops option, using crx-elf-gcc vesion 4.5.0 20080307 (sources from trunk).
Command line:
crx-elf-gcc test.c -o3 -funroll-all-loops

test.c:187: error: insn does not satisfy its constraints:
(insn 8 119 130 2 /scratch/user/swami/test.c:149 (set (mem/c/i:SI (post_modify:SI (reg:SI 3 r3)
                (plus:SI (reg:SI 3 r3)
                    (const_int 8 [0x8]))) [3 x1+0 S4 A32])
        (const_int 0 [0x0])) 91 {movsi_store} (expr_list:REG_INC (reg:SI 3 r3)
        (nil)))
/scratch/user/swami/test.c:187: internal compiler error: in copyprop_hardreg_forward_1, at regrename.c:1603
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
====

NOTE: This issue not obsered with crx-elf-gcc 4.1.1 tools.
Comment 1 M R Swami Reddy 2009-04-08 05:09:44 UTC
Created attachment 17607 [details]
Bug testcase
Comment 2 Paolo Bonzini 2009-04-08 11:01:38 UTC
Minimized testcase is this:

int baz (void *, ...);
static void bar();
char c;
float f;
void foo(void) { bar(0,0,0, c, c, f, foo); }
void bar (x1,x2,x3, ss, c, f, pf) { baz(&x1,&x2,&x3); }
Comment 3 M R Swami Reddy 2009-04-09 11:00:16 UTC
This issue is not reproduced with gcc-4.3.3 sources (ie released sources).
Only obsereved with gcc-4.5.0 trunk sources.
Comment 4 M R Swami Reddy 2009-04-13 05:09:36 UTC
NOTE-1: This problem seen with "gcc-4.4" and "gcc-4.5" (ie trunk) sources 
        built crx-elf-gcc compiler.

NOTE-2: With "-O2 -funroll-all-loops" options also reproduce this problem.
Comment 5 Paolo Bonzini 2009-04-14 07:28:07 UTC
-O2 -frename-registers is enough actually.
Comment 6 M R Swami Reddy 2009-05-01 11:42:42 UTC
This problem is reproduced with latest gcc-4.4.0 release tools (ie crx-elf-gcc version 4.4.0).
Comment 7 Joseph S. Myers 2011-03-22 20:25:46 UTC
CRX support has been removed for GCC 4.7.