aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorIlya Enkovich <enkovich.gnu@gmail.com>2015-10-23 13:38:16 +0000
committerIlya Enkovich <ienkovich@gcc.gnu.org>2015-10-23 13:38:16 +0000
commitf819b3b278609360242d969027031a9a9381edeb (patch)
tree5378eae13fb0aa7cb3180d45337f4190cddd875b /gcc/tree.c
parentabcb651bac5a4aeadca671b7ed76d396788cfa10 (diff)
downloadgcc-f819b3b278609360242d969027031a9a9381edeb.zip
gcc-f819b3b278609360242d969027031a9a9381edeb.tar.gz
gcc-f819b3b278609360242d969027031a9a9381edeb.tar.bz2
re PR middle-end/68066 (ICE in max_value, at wide-int.cc)
gcc/ PR middle-end/68066 * tree.c (build_truth_vector_type): Support BLK mode returned for boolean vector. From-SVN: r229256
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 09df67e..79bbd07 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -10671,8 +10671,14 @@ build_truth_vector_type (unsigned nunits, unsigned vector_size)
gcc_assert (mask_mode != VOIDmode);
- unsigned HOST_WIDE_INT esize = GET_MODE_BITSIZE (mask_mode) / nunits;
- gcc_assert (esize * nunits == GET_MODE_BITSIZE (mask_mode));
+ unsigned HOST_WIDE_INT vsize;
+ if (mask_mode == BLKmode)
+ vsize = vector_size * BITS_PER_UNIT;
+ else
+ vsize = GET_MODE_BITSIZE (mask_mode);
+
+ unsigned HOST_WIDE_INT esize = vsize / nunits;
+ gcc_assert (esize * nunits == vsize);
tree bool_type = build_nonstandard_boolean_type (esize);