From f819b3b278609360242d969027031a9a9381edeb Mon Sep 17 00:00:00 2001 From: Ilya Enkovich Date: Fri, 23 Oct 2015 13:38:16 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/tree.c | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 52dca17a557..54359a0f0f6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-10-23 Ilya Enkovich + + PR middle-end/68066 + * tree.c (build_truth_vector_type): Support BLK mode + returned for boolean vector. + 2015-10-23 Alan Hayward PR tree-optimization/65947 diff --git a/gcc/tree.c b/gcc/tree.c index 09df67ebf88..79bbd0752c8 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); -- 2.30.2