public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PR 79905] ICE with vector_type
@ 2017-04-03 19:03 Nathan Sidwell
  2017-04-04  8:28 ` Richard Biener
  0 siblings, 1 reply; 23+ messages in thread
From: Nathan Sidwell @ 2017-04-03 19:03 UTC (permalink / raw)
  To: wschmidt; +Cc: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

Bill,
can you give this patch a spin please? I've smoke tested it on a ppc64le 
x-compiler, but don't have one to run executables.  regression testing 
on an x86_64-linux system is ok.

The DEPENDENT_TYPE_VALID_P thing is a red herring.

It is the canonical type table's equal function considering most types 
with different TYPE_NAMEs to be different.  Now, you might think that 
only applies to things like RECORD_TYPE, but no,  wchar_t is different 
from plain int, for example.

However, as you can see there's already a get-out for COMPLEX_TYPE, and 
I think the same is needed for VECTOR_TYPE.

Both set_underlying_type and rs6000 set the builtin vector type's 
TYPE_NAME, and so one constructed via applying 
__attribute__((vector_size(16))) will never match.   And it should.

nathan
-- 
Nathan Sidwell


[-- Attachment #2: 79905.diff --]
[-- Type: text/x-patch, Size: 816 bytes --]

Index: tree.c
===================================================================
--- tree.c	(revision 246647)
+++ tree.c	(working copy)
@@ -7005,10 +7005,11 @@ type_cache_hasher::equal (type_hash *a,
   if (a->hash != b->hash
       || TREE_CODE (a->type) != TREE_CODE (b->type)
       || TREE_TYPE (a->type) != TREE_TYPE (b->type)
-      || !attribute_list_equal (TYPE_ATTRIBUTES (a->type),
-				 TYPE_ATTRIBUTES (b->type))
       || (TREE_CODE (a->type) != COMPLEX_TYPE
-          && TYPE_NAME (a->type) != TYPE_NAME (b->type)))
+	  && TREE_CODE (a->type) != VECTOR_TYPE
+          && TYPE_NAME (a->type) != TYPE_NAME (b->type))
+      || !attribute_list_equal (TYPE_ATTRIBUTES (a->type),
+				TYPE_ATTRIBUTES (b->type)))
     return 0;
 
   /* Be careful about comparing arrays before and after the element type

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-04-10 11:24 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03 19:03 [PR 79905] ICE with vector_type Nathan Sidwell
2017-04-04  8:28 ` Richard Biener
2017-04-04 11:31   ` Nathan Sidwell
2017-04-04 13:00     ` Richard Biener
2017-04-04 13:49       ` Nathan Sidwell
2017-04-04 13:57         ` Bill Schmidt
2017-04-04 14:02           ` Nathan Sidwell
2017-04-04 17:40             ` Bill Schmidt
2017-04-04 18:02               ` Nathan Sidwell
2017-04-04 20:46                 ` Bill Schmidt
2017-04-05 13:18                   ` Nathan Sidwell
2017-04-05 13:35                     ` Bill Schmidt
2017-04-05 14:14                       ` Nathan Sidwell
2017-04-05 20:33                         ` Bill Schmidt
2017-04-06 10:29                           ` Richard Biener
2017-04-06 11:28                             ` Nathan Sidwell
2017-04-06 14:04                               ` Richard Biener
2017-04-06 14:20                                 ` Bill Schmidt
2017-04-06 14:26                                   ` Bill Schmidt
2017-04-06 15:13                                     ` Bill Schmidt
2017-04-06 18:34                                       ` Nathan Sidwell
2017-04-06 20:18                                         ` Segher Boessenkool
2017-04-10 11:24                                           ` Nathan Sidwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).