https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122483
--- Comment #32 from Alex Coplan <acoplan at gcc dot gnu.org> --- (In reply to Richard Sandiford from comment #31) > (In reply to Alex Coplan from comment #30) > > So having looked at this more closely, I think the behaviour we want for > > aarch64 is that we don't allow any type attributes to be merged into a > > subsequent (otherwise duplicate) decl without attributes if any of the > > attributes in the first decl have affects_type_identity set. > Yeah, I agree that that seems to be the case FWIW. Thanks, that's reassuring. > That said, perhaps a simpler approach would be define a new return type for > TARGET_COMP_TYPE_ATTRIBUTES. E.g. -1 could mean that the type attributes > are “strongly” incompatible and mustn't be merged. I can't remember whether > that's already been discussed. I hadn't considered that. While it avoids introducing a new target hook, it seems that it has the potential to be a bit more invasive to the front-end / middle-end code. I can certainly give it a go, though.
