diff options
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -9144,10 +9144,10 @@ int_fits_type_p (const_tree c, const_tree type) bool ok_for_low_bound, ok_for_high_bound; signop sgn_c = TYPE_SIGN (TREE_TYPE (c)); - /* Short-circuit boolean types since various transformations assume that - they can only take values 0 and 1. */ + /* Non-standard boolean types can have arbitrary precision but various + transformations assume that they can only take values 0 and +/-1. */ if (TREE_CODE (type) == BOOLEAN_TYPE) - return integer_zerop (c) || integer_onep (c); + return wi::fits_to_boolean_p (c, type); retry: type_low_bound = TYPE_MIN_VALUE (type); |