aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 421a2b4..e0a1d512 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -14021,8 +14021,13 @@ vector_element_bits (const_tree type)
{
gcc_checking_assert (VECTOR_TYPE_P (type));
if (VECTOR_BOOLEAN_TYPE_P (type))
- return vector_element_size (tree_to_poly_uint64 (TYPE_SIZE (type)),
- TYPE_VECTOR_SUBPARTS (type));
+ {
+ if (VECTOR_MODE_P (TYPE_MODE (type)))
+ return vector_element_size (tree_to_poly_uint64 (TYPE_SIZE (type)),
+ TYPE_VECTOR_SUBPARTS (type));
+ else
+ return 1;
+ }
return tree_to_uhwi (TYPE_SIZE (TREE_TYPE (type)));
}