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

--- Comment #14 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Created attachment 43947
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43947&action=edit
Proposed fix

We looked into this with Maritn todday. There are two bugs: one is the fact
that lto.c forgets to register the type in case it was within strongly
connected component after its outer type. The order depends on hash values and
is not well determined. We do not want to test TYPE_CANONICAL being non-NULL.
Martin is testing it.

Other is the fact that Eric's last change make odr types compatible when one of
them is incomplete. This is not necessarily the case. The patch should fix the
ordering issue by going the slow path in case type already in hashtable is
incomplete. In this case it won't take long to compare it with the other type
anyway.

Reply via email to