https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67896
James Greenhalgh <jgreenhalgh at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-01-11 CC| |jgreenhalgh at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from James Greenhalgh <jgreenhalgh at gcc dot gnu.org> --- Confirmed, and thanks for the detailed analysis and the candidate patch. I think I agree with what your saying, and the patch looks like the right thing to do to me (though I would refactor it to avoid the need for the bool, can we not just pull the SET_TYPE_STRUCTURAL_EQUALITY check in to the if statement in which you set is_vector?). I was a little concerned that now a poly8_t and an int8_t would compare equal, but I see that build_distinct_type_copy sets TYPE_CANONICAL correctly for the scalar poly types, so I don't have to worry. Please submit your patch to the mailing list along with the testcase here annotated with the relevant dejagnu directives.