diff options
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h index c39b58e1a6d..cc308278a45 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4006,7 +4006,7 @@ extern tree build_varargs_function_type_array (tree, int, tree *); extern tree build_method_type_directly (tree, tree, tree); extern tree build_method_type (tree, tree); extern tree build_offset_type (tree, tree); -extern tree build_complex_type (tree); +extern tree build_complex_type (tree, bool named = false); extern tree array_type_nelts (const_tree); extern tree value_member (tree, tree); @@ -5289,6 +5289,11 @@ template <typename T> bool wi::fits_to_tree_p (const T &x, const_tree type) { + /* Short-circuit boolean types since various transformations assume that + they can only take values 0 and 1. */ + if (TREE_CODE (type) == BOOLEAN_TYPE) + return eq_p (x, 0) || eq_p (x, 1); + if (TYPE_SIGN (type) == UNSIGNED) return eq_p (x, zext (x, TYPE_PRECISION (type))); else |