diff options
author | Ilya Enkovich <enkovich.gnu@gmail.com> | 2015-11-09 15:11:02 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2015-11-09 15:11:02 +0000 |
commit | 0e657ecb98b8413b41975ddfce8e240186720977 (patch) | |
tree | 356c7ce476f9dfc1708d4f64fb523e2a036c35c9 /gcc/tree.c | |
parent | 0b3ecf755196df79c795c8b9bbcb735adbb604d0 (diff) | |
download | gcc-0e657ecb98b8413b41975ddfce8e240186720977.zip gcc-0e657ecb98b8413b41975ddfce8e240186720977.tar.gz gcc-0e657ecb98b8413b41975ddfce8e240186720977.tar.bz2 |
optabs.c (expand_vec_cond_expr): Always get sign from type.
gcc/
* optabs.c (expand_vec_cond_expr): Always get sign from type.
* tree.c (wide_int_to_tree): Support negative values for boolean.
(build_nonstandard_boolean_type): Use signed type for booleans.
From-SVN: r230022
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1439,7 +1439,7 @@ wide_int_to_tree (tree type, const wide_int_ref &pcst) case BOOLEAN_TYPE: /* Cache false or true. */ limit = 2; - if (hwi < 2) + if (IN_RANGE (hwi, 0, 1)) ix = hwi; break; @@ -8072,7 +8072,7 @@ build_nonstandard_boolean_type (unsigned HOST_WIDE_INT precision) type = make_node (BOOLEAN_TYPE); TYPE_PRECISION (type) = precision; - fixup_unsigned_type (type); + fixup_signed_type (type); if (precision <= MAX_INT_CACHED_PREC) nonstandard_boolean_type_cache[precision] = type; |