This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix enable-checking failures flow.c
- To: gcc-patches at gcc dot gnu dot org
- Subject: Fix enable-checking failures flow.c
- From: Graham Stott <grahams at redhat dot com>
- Date: Tue, 31 Jul 2001 01:17:05 +0100
All
This patch fixes two enable checking failures
Bootstrapped x86-linux and built x86-x-arm-elf, x86-x-mips-elf.
Graham
ChangeLog
* flow.c (flow_delete_insn): Check we have a CODE_LABEL
before decrementing its usage count.
(elim_reg_cond): Check it's a REG before extracting REGNO.
------------------------------------------------------------------
Index: flow.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flow.c,v
retrieving revision 1.450
diff -c -p -r1.450 flow.c
*** flow.c 2001/07/29 17:01:52 1.450
--- flow.c 2001/07/30 20:03:32
*************** flow_delete_insn (insn)
*** 2741,2747 ****
int i;
for (i = 0; i < len; i++)
! LABEL_NUSES (XEXP (XVECEXP (pat, diff_vec_p, i), 0))--;
}
return next;
--- 2745,2756 ----
int i;
for (i = 0; i < len; i++)
! {
! rtx label_ref = XEXP (XVECEXP (pat, diff_vec_p, i), 0);
!
! if (GET_CODE (label_ref) == CODE_LABEL)
! LABEL_NUSES (label_ref)--;
! }
*************** elim_reg_cond (x, regno)
*** 6697,6703 ****
if (GET_RTX_CLASS (GET_CODE (x)) == '<')
{
! if (REGNO (XEXP (x, 0)) == regno)
return const0_rtx;
return x;
}
--- 6707,6713 ----
if (GET_RTX_CLASS (GET_CODE (x)) == '<')
{
! if (REG_P (XEXP (x, 0)) && REGNO (XEXP (x, 0)) == regno)
return const0_rtx;
return x;
}
}
return next;
-----------------------------------------------------------------------------------