* stmt.c (expand_end_case): Remove orig_minval and use tree_low_cst.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Thu, 25 Oct 2001 12:42:15 +0000 (12:42 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 25 Oct 2001 12:42:15 +0000 (08:42 -0400)
From-SVN: r46486

gcc/ChangeLog
gcc/stmt.c

index df79dec9c83208ed3cb5183337e946ae7ead68cd..8c5c931835dda40a75d6196f89e7169426105f8a 100644 (file)
@@ -1,3 +1,7 @@
+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.
+
 2001-10-24  Christopher Faylor  <cgf@redhat.com>
 
        * config/i386/cygwin.h: Use proper path for mingw crt files when
index 76fa4393ee5b88fff3ef1d1a71fa628af5032a3d..d5c736f1df11cf0138090a6f140051a92fbc6f0c 100644 (file)
@@ -5317,7 +5317,7 @@ void
 expand_end_case (orig_index)
      tree orig_index;
 {
-  tree minval = NULL_TREE, maxval = NULL_TREE, range = NULL_TREE, orig_minval;
+  tree minval = NULL_TREE, maxval = NULL_TREE, range = NULL_TREE;
   rtx default_label = 0;
   struct case_node *n;
   unsigned int count;
@@ -5417,8 +5417,6 @@ expand_end_case (orig_index)
            count++;
        }
 
-      orig_minval = minval;
-
       /* Compute span of values.  */
       if (count != 0)
        range = fold (build (MINUS_EXPR, index_type, maxval, minval));
@@ -5559,14 +5557,14 @@ expand_end_case (orig_index)
          for (n = thiscase->data.case_stmt.case_list; n; n = n->right)
            {
              HOST_WIDE_INT i
-               = TREE_INT_CST_LOW (n->low) - TREE_INT_CST_LOW (orig_minval);
+               = tree_low_cst (n->low, 0) - tree_low_cst (minval, 0);
 
              while (1)
                {
                  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))
+                 if (i + tree_low_cst (minval, 0)
+                     == tree_low_cst (n->high, 0))
                    break;
                  i++;
                }