diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-04-21 08:11:06 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-04-21 08:11:06 -0400 |
commit | 8980b5a34d2d8953f64fe6ca428dd2fa00969aab (patch) | |
tree | 1e2d184b6ccdd5110c1c94370f7d0d0b3fa6220c /gcc | |
parent | 4ac8e06eb12c14af065e0bea11dd5b9d94cb2f94 (diff) | |
download | gcc-8980b5a34d2d8953f64fe6ca428dd2fa00969aab.zip gcc-8980b5a34d2d8953f64fe6ca428dd2fa00969aab.tar.gz gcc-8980b5a34d2d8953f64fe6ca428dd2fa00969aab.tar.bz2 |
(integer_all_onesp): Test to size of mode, not TYPE_PRECISION.
From-SVN: r9427
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1530,7 +1530,9 @@ integer_all_onesp (expr) if (!uns) return TREE_INT_CST_LOW (expr) == -1 && TREE_INT_CST_HIGH (expr) == -1; - prec = TYPE_PRECISION (TREE_TYPE (expr)); + /* Note that using TYPE_PRECISION here is wrong. We care about the + actual bits, not the (arbitrary) range of the type. */ + prec = GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (expr))); if (prec >= HOST_BITS_PER_WIDE_INT) { int high_value, shift_amount; |