On 10/16/24 11:43 AM, Simon Martin wrote:
As you know the patch had to be reverted due to PR117114, that
highlighted a bunch of issues with comparing DECL_VINDEXes: it might
give false positives in case of multiple inheritance (the case in
PR117114), but also if there’s single inheritance by the hierarchy has
more than two levels (another issue I found while bootstrapping with
rust enabled).

Yes, relying on DECL_VINDEX equality was wrong, sorry to mislead you.

The attached updated patch introduces an overrides_p function, based on
the existing check_final_overrider, and uses it when the signatures match.

That seems unnecessary. It seems like removing that only breaks Woverloaded-virt11.C, and making that work again only requires bringing back the check that DECL_VINDEX (fndecl) is set (to any value). Or remembering that fndecl was a template, so it can't really have the same signature as a non-template, whatever same_signature_p says.

Jason

Reply via email to