This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
loop bugfix
- To: egcs-patches at egcs dot cygnus dot com
- Subject: loop bugfix
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 25 Jun 1999 05:35:45 -0600
- Reply-To: law at cygnus dot com
This fixes compile/990625-1.c (a new test for an x86 glibc problem).
In a nutshell we have a loop with a jump table. We tried to peek at
JUMP_LABEL (ADDR_DIFF) and got back NULL_RTX. We then tried to look at
the INSN_LUID of the NULL_RTX and blew up.
* loop.c (verify_dominator): Properly handle ADDR_VEC and
ADDR_DIFF_VEC insns that appear inside loops.
Index: loop.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/loop.c,v
retrieving revision 1.156.4.6
diff -c -3 -p -r1.156.4.6 loop.c
*** loop.c 1999/06/10 00:24:42 1.156.4.6
--- loop.c 1999/06/25 11:31:59
*************** verify_dominator (loop_number)
*** 2557,2570 ****
&& GET_CODE (PATTERN (insn)) != RETURN)
{
rtx label = JUMP_LABEL (insn);
! int label_luid = INSN_LUID (label);
! if (! condjump_p (insn)
! && ! condjump_in_parallel_p (insn))
{
loop_number_cont_dominator[loop_number] = NULL_RTX;
return;
}
if (label_luid < INSN_LUID (loop_number_loop_cont[loop_number])
&& (label_luid
> INSN_LUID (loop_number_cont_dominator[loop_number])))
--- 2557,2577 ----
&& GET_CODE (PATTERN (insn)) != RETURN)
{
rtx label = JUMP_LABEL (insn);
! int label_luid;
! /* If it is not a jump we can easily understand or for
! which we do not have jump target information in the JUMP_LABEL
! field (consider ADDR_VEC and ADDR_DIFF_VEC insns), then clear
! LOOP_NUMBER_CONT_DOMINATOR. */
! if ((! condjump_p (insn)
! && ! condjump_in_parallel_p (insn))
! || label == NULL_RTX)
{
loop_number_cont_dominator[loop_number] = NULL_RTX;
return;
}
+
+ label_luid = INSN_LUID (label);
if (label_luid < INSN_LUID (loop_number_loop_cont[loop_number])
&& (label_luid
> INSN_LUID (loop_number_cont_dominator[loop_number])))