This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/18577] [3.3 regression] variable use moved before initialization
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Nov 2004 09:07:14 -0000
- Subject: [Bug rtl-optimization/18577] [3.3 regression] variable use moved before initialization
- References: <20041120163030.18577.falk@debian.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-11-21 09:07 -------
> IIRC note luids are supposed to be a superset of regular luids, so your check
> should be redundant (see regclass.c:reg_scan_mark_refs). Now something could
> have invalidated this relationship.
It's this chunk of code in load_mems:
set = gen_move_insn (reg, best);
set = loop_insn_hoist (loop, set);
if (REG_P (best))
{
for (p = prev_ebb_head; p != loop->start; p = NEXT_INSN (p))
if (REGNO_LAST_UID (REGNO (best)) == INSN_UID (p))
{
REGNO_LAST_UID (REGNO (best)) = INSN_UID (set);
break;
}
}
which changes REGNO_LAST_UID without updating REGNO_LAST_NOTE_UID for pseudo 78.
Note that there is no note mentioning pseudo 78 so REGNO_LAST_NOTE_UID points
to garbage after it is executed.
We could probably update REGNO_LAST_NOTE_UID too here, but there might be other
places with the same problem so I think your proposed fix is the safest one.
I'm going to test it on x86.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18577