This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/25432] [4.1/4.2 Regression] Reload ICE in gen_add2_insn
- From: "amodra at bigpond dot net dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Dec 2005 02:36:03 -0000
- Subject: [Bug rtl-optimization/25432] [4.1/4.2 Regression] Reload ICE in gen_add2_insn
- References: <bug-25432-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from amodra at bigpond dot net dot au 2005-12-16 02:36 -------
Looks to be a bug in eliminate_regs_in_insn. This function changes the type of
the insn from (set (reg) (reg)) to (set (plus (reg) (const_int))) but doesn't
update INSN_CODE (insn). find_reloads calls extract_insn, which calls
recog_memoized, which used the old INSN_CODE. Thus find_reloads is using
invalid recog_data. No wonder reload is confused.
There is even code in eliminate_regs_in_insn to re-recognized the insn but it
is ineffective.
{
int new_icode = recog (PATTERN (insn), insn, 0);
if (new_icode < 0)
INSN_CODE (insn) = icode;
}
I think this should be
{
int new_icode = recog (PATTERN (insn), insn, 0);
if (new_icode >= 0)
INSN_CODE (insn) = new_icode;
}
--
amodra at bigpond dot net dot au changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
Target Milestone|4.1.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25432