> > Actually this was intended to be prevail in both cases, but it is > > harmless. The difference here is that anonymous types have > > DECL_ASSEMBLED_NAME <anon>, so if we inserted them to the hash > > table based on names they will all conflict. > > > > Anonymous namespace types never have duplicated main variants, so > > t==prevail here, but I will update the patch to use prevail since it is > > much more obvious (I am also not sure what I was thinking of when > > I typed TYPE_MAIN_VARIANT) > > I think using 't' is more obvious here since that's what we should cache > the hash value for. That is, even in the !type_in_anonymous_namespace_p > (t) case you want to cache 't's hash, not prevails. But yes, > TYPE_UID (prevail) might be more obvious to you.
OK, I will use t on both: for !anonoymous_namespace types the names are the same. Honza > > > > > > > Otherwise looks good. > > > > > > You can commit the C++ FE change with the adjustment in case it > > > fixes the reported verification ICEs. > > > > It only fixes ICE WRT the sanity checking that all non-ODR types > > are inserted first. W/o that change the as-base type will get inserted > > during streaming in and recursively we will insert ODR types early. > > > > I am waiting for testcase WRT the other ODR ICE reported today. I think > > tree.c when creating type variants wants to copy the flag: the wrong > > type is va_list which is likely created by a backend bypassing the C++ > > hook. > > > > I will re-test with these changes. > > > > Honza > > > > -- > Richard Biener <rguent...@suse.de> > SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; > GF: Felix Imendörffer, Mary Higgins, Sri Rasiah; HRB 21284 (AG Nürnberg)