From bb4291d9ded2c423a993a411acbcb910903d32af Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 14 Jun 2018 10:55:31 +0000 Subject: [PATCH] re PR target/86139 (ICE in in store_constructor, at expr.c:6849 on arm-linux-gnueabihf) 2018-06-14 Richard Biener PR middle-end/86139 * tree-vect-generic.c (build_word_mode_vector_type): Remove duplicate and harmful type_hash_canon. * tree.c (type_hash_canon): Assert we didn't find ourselves. From-SVN: r261588 --- gcc/ChangeLog | 7 +++++++ gcc/tree-vect-generic.c | 6 +----- gcc/tree.c | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bdd94933e1c..269704804bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-06-14 Richard Biener + + PR middle-end/86139 + * tree-vect-generic.c (build_word_mode_vector_type): Remove + duplicate and harmful type_hash_canon. + * tree.c (type_hash_canon): Assert we didn't find ourselves. + 2018-06-14 Richard Biener PR ipa/86124 diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index 46502c42c74..909f7903b93 100644 --- a/gcc/tree-vect-generic.c +++ b/gcc/tree-vect-generic.c @@ -111,12 +111,8 @@ build_word_mode_vector_type (int nunits) return vector_last_type; } - /* We build a new type, but we canonicalize it nevertheless, - because it still saves some memory. */ vector_last_nunits = nunits; - vector_last_type = type_hash_canon (nunits, - build_vector_type (vector_inner_type, - nunits)); + vector_last_type = build_vector_type (vector_inner_type, nunits); return vector_last_type; } diff --git a/gcc/tree.c b/gcc/tree.c index b0c3a798470..2d3b26ed66b 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -6623,7 +6623,8 @@ type_hash_canon (unsigned int hashcode, tree type) if (*loc) { tree t1 = ((type_hash *) *loc)->type; - gcc_assert (TYPE_MAIN_VARIANT (t1) == t1); + gcc_assert (TYPE_MAIN_VARIANT (t1) == t1 + && t1 != type); if (TYPE_UID (type) + 1 == next_type_uid) --next_type_uid; /* Free also min/max values and the cache for integer -- 2.30.2