This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Fix problem with stmt.c:expand_end_case


Roger said his patch depended on a previous patch that removed orig_minval.
He was correct, but that patch was never installed.  This is that patch plus
a minor cleanup.  This fixes the x86 bootstrap problem.

Thu Oct 25 08:46:06 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* stmt.c (expand_end_case): Remove orig_minval and use tree_low_cst.

*** stmt.c	2001/10/24 22:11:40	1.223
--- stmt.c	2001/10/25 12:37:53
*************** expand_end_case (orig_index)
*** 5318,5322 ****
       tree orig_index;
  {
!   tree minval = NULL_TREE, maxval = NULL_TREE, range = NULL_TREE, orig_minval;
    rtx default_label = 0;
    struct case_node *n;
--- 5318,5322 ----
       tree orig_index;
  {
!   tree minval = NULL_TREE, maxval = NULL_TREE, range = NULL_TREE;
    rtx default_label = 0;
    struct case_node *n;
*************** expand_end_case (orig_index)
*** 5418,5423 ****
  	}
  
-       orig_minval = minval;
- 
        /* Compute span of values.  */
        if (count != 0)
--- 5418,5421 ----
*************** expand_end_case (orig_index)
*** 5560,5564 ****
  	    {
  	      HOST_WIDE_INT i
! 		= TREE_INT_CST_LOW (n->low) - TREE_INT_CST_LOW (orig_minval);
  
  	      while (1)
--- 5558,5562 ----
  	    {
  	      HOST_WIDE_INT i
! 		= tree_low_cst (n->low, 0) - tree_low_cst (minval, 0);
  
  	      while (1)
*************** expand_end_case (orig_index)
*** 5566,5571 ****
  		  labelvec[i]
  		    = gen_rtx_LABEL_REF (Pmode, label_rtx (n->code_label));
! 		  if (i + TREE_INT_CST_LOW (orig_minval)
! 		      == TREE_INT_CST_LOW (n->high))
  		    break;
  		  i++;
--- 5564,5569 ----
  		  labelvec[i]
  		    = gen_rtx_LABEL_REF (Pmode, label_rtx (n->code_label));
! 		  if (i + tree_low_cst (minval, 0)
! 		      == tree_low_cst (n->high, 0))
  		    break;
  		  i++;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]