https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79905

--- Comment #9 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
I believe the problem has to do with the basic integer type for SI mode
changing hash values after it is first created.  I stopped in make_vector_type
for all vectors created with 4 elements, and found three of them with a base
type having SI mode.

The first two had the same base integer type, reported as "int public SI". 
Both were canonicalized to the first one that was created, all good.

The third had the same base integer type, but that type had changed slightly in
the meanwhile.  It was now reported as "int public type_6 SI".  As a result,
this appeared to change the hash for vector types based upon it.  This third
type was created in response to the "vector int b;" decl (the AltiVec decl);
and the hash of this type was now unique, so it was canonicalized to itself.

Interestingly, the V4i type was created without ever going through the
make_vector_type interface.  I haven't tracked down where it came from, but I
believe that to be irrelevant.  When we ICE, the V4i type exists, is based on
the same "int public type_6 SI" type, and canonicalizes to the AltiVec type.

So the problem is not that the AltiVec and V4i types are incompatible.  We ICE
when observing that the very first type created is not canonicalized to the
same type as the V4i type is.  My theory is that the change involving "type_6"
is responsible for this.

Reply via email to