From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25373 invoked by alias); 21 Nov 2004 09:07:20 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25013 invoked by uid 48); 21 Nov 2004 09:07:14 -0000 Date: Sun, 21 Nov 2004 09:07:00 -0000 Message-ID: <20041121090714.25012.qmail@sourceware.org> From: "ebotcazou at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041120163030.18577.falk@debian.org> References: <20041120163030.18577.falk@debian.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug rtl-optimization/18577] [3.3 regression] variable use moved before initialization X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg02415.txt.bz2 List-Id: ------- 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