ICE with --enable-bootstrapping in nothrow_function_p/can_throw

Richard Henderson rth@cygnus.com
Fri Mar 10 11:13:00 GMT 2000


On Fri, Mar 10, 2000 at 06:36:07PM +0000, grahams wrote:
> Yep, I think should also be using XWINT () rather than XINT ()

Rather INTVAL.


r~


        * except.c (can_throw): Use INTVAL on a CONST_INT.
        (reachable_handlers): Likewise.
        * flow.c (count_basic_blocks, find_basic_blocks_1): Likewise.

Index: except.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/except.c,v
retrieving revision 1.122
diff -c -p -d -r1.122 except.c
*** except.c	2000/03/09 20:37:06	1.122
--- except.c	2000/03/10 19:10:49
*************** can_throw (insn)
*** 2629,2635 ****
    if (GET_CODE (insn) == CALL_INSN)
      {
        rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
!       if (!note || XINT (XEXP (note, 0), 0) > 0)
  	return 1;
      }
  
--- 2629,2635 ----
    if (GET_CODE (insn) == CALL_INSN)
      {
        rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
!       if (!note || INTVAL (XEXP (note, 0), 0) > 0)
  	return 1;
      }
  
*************** reachable_handlers (block, info, insn, h
*** 3390,3396 ****
  	  note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
  	  if (note)
  	    {
! 	      int b = XINT (XEXP (note, 0), 0);
  	      if (b <= 0)
  	        index = 0;
  	      else
--- 3390,3396 ----
  	  note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
  	  if (note)
  	    {
! 	      int b = INTVAL (XEXP (note, 0), 0);
  	      if (b <= 0)
  	        index = 0;
  	      else
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.230
diff -c -p -d -r1.230 flow.c
*** flow.c	2000/03/10 08:16:55	1.230
--- flow.c	2000/03/10 19:10:50
*************** count_basic_blocks (f)
*** 466,472 ****
        if (code == CALL_INSN)
  	{
  	  rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
! 	  int region = (note ? XWINT (XEXP (note, 0), 0) : 1);
  	  prev_call = insn;
  	  call_had_abnormal_edge = 0;
  
--- 466,472 ----
        if (code == CALL_INSN)
  	{
  	  rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
! 	  int region = (note ? INTVAL (XEXP (note, 0), 0) : 1);
  	  prev_call = insn;
  	  call_had_abnormal_edge = 0;
  
*************** find_basic_blocks_1 (f)
*** 540,546 ****
  	{
  	  /* Record whether this call created an edge.  */
  	  rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
! 	  int region = (note ? XWINT (XEXP (note, 0), 0) : 1);
  	  call_has_abnormal_edge = 0;
  
  	  /* If there is an EH region or rethrow, we have an edge.  */
--- 540,546 ----
  	{
  	  /* Record whether this call created an edge.  */
  	  rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
! 	  int region = (note ? INTVAL (XEXP (note, 0), 0) : 1);
  	  call_has_abnormal_edge = 0;
  
  	  /* If there is an EH region or rethrow, we have an edge.  */


More information about the Gcc-patches mailing list