re PR target/86139 (ICE in in store_constructor, at expr.c:6849 on arm-linux-gnueabihf)
authorRichard Biener <rguenther@suse.de>
Thu, 14 Jun 2018 10:55:31 +0000 (10:55 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 14 Jun 2018 10:55:31 +0000 (10:55 +0000)
2018-06-14  Richard Biener  <rguenther@suse.de>

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
gcc/tree-vect-generic.c
gcc/tree.c

index bdd94933e1c82ead366904097db6e58ef3042b97..269704804bcbd186373e29cd2fcb866cd122d4c3 100644 (file)
@@ -1,3 +1,10 @@
+2018-06-14  Richard Biener  <rguenther@suse.de>
+
+       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  <rguenther@suse.de>
 
        PR ipa/86124
index 46502c42c7463b60357abf11cd5b31d35e10a968..909f7903b93ad66a5d615935a384a727d630fb6e 100644 (file)
@@ -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;
 }
 
index b0c3a798470e1c27aadb1a27851f9b537f9832b8..2d3b26ed66b29df68bab3835b4a7dea8a3116ebf 100644 (file)
@@ -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