* jump.c (jump_optimize) Check for CONST_INT before using INTVAL.
authorAlasdair Baird <alasdair@wildcat.demon.co.uk>
Mon, 6 Jul 1998 21:19:17 +0000 (21:19 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 6 Jul 1998 21:19:17 +0000 (15:19 -0600)
From-SVN: r20962

gcc/ChangeLog
gcc/jump.c

index 6d26102d9f112e320f4be5ec32291fe54e6a7c64..1aac5d0718aa946fd0bcb205580a2a084adf7b0c 100644 (file)
@@ -1,3 +1,7 @@
+Mon Jul  6 22:17:19 1998  Alasdair Baird       <alasdair@wildcat.demon.co.uk>
+
+       * jump.c (jump_optimize) Check for CONST_INT before using INTVAL.
+
 Mon Jul  6 22:14:31 1998  Richard Henderson  (rth@cygnus.com)
 
        * regclass.c (allocate_reg_info): Initialize the entire reg_data
index 389a6ff1e6441c4c22f178068411d1a70ebe5729..7184e11b77fc9874b269f161b445102cb34c7a03 100644 (file)
@@ -1299,11 +1299,13 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
                         /* Check that the mask is a power of two,
                            so that it can probably be generated
                            with a shift.  */
+                           && GET_CODE (temp3) == CONST_INT
                            && exact_log2 (INTVAL (temp3)) >= 0))
                       && (reversep = 0, temp2 == const0_rtx))
                      || ((BRANCH_COST >= 2
                           || STORE_FLAG_VALUE == -1
                           || (STORE_FLAG_VALUE == 1
+                              && GET_CODE (temp2) == CONST_INT
                               && exact_log2 (INTVAL (temp2)) >= 0))
                          && temp3 == const0_rtx
                          && (reversep = can_reverse_comparison_p (temp4, insn)))