This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/25432] [4.1/4.2 Regression] Reload ICE in gen_add2_insn



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]