From: Richard Stallman Date: Sun, 7 Feb 1993 17:24:37 +0000 (+0000) Subject: (fold): Call force_fit_type with two parameters. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef2bf0c061d67c26b877151cd1983dbe39393aef;p=gcc.git (fold): Call force_fit_type with two parameters. (force_fit_type): Don't examine the tree until it is known to an INTEGER_CST. If it isn't, just return. From-SVN: r3434 --- diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 6e683e2e201..5a7aa46dc95 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -123,14 +123,19 @@ force_fit_type (t, overflow) tree t; int overflow; { - HOST_WIDE_INT low = TREE_INT_CST_LOW (t), high = TREE_INT_CST_HIGH (t); - register int prec = TYPE_PRECISION (TREE_TYPE (t)); + HOST_WIDE_INT low, high; + register int prec; if (TREE_CODE (t) != INTEGER_CST) - abort (); + return overflow; + + low = TREE_INT_CST_LOW (t); + high = TREE_INT_CST_HIGH (t); if (TREE_CODE (TREE_TYPE (t)) == POINTER_TYPE) prec = POINTER_SIZE; + else + prec = TYPE_PRECISION (TREE_TYPE (t)); /* First clear all bits that are beyond the type's precision. */ @@ -3258,7 +3263,7 @@ fold (expr) { t = build_int_2 (TREE_STRING_POINTER (arg0)[i], 0); TREE_TYPE (t) = TREE_TYPE (TREE_TYPE (arg0)); - force_fit_type (t); + force_fit_type (t, 0); } } return t;