------- 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

Reply via email to