https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83983
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|testsuite |ipa
--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> In other words, get_odr_type (t1, true) works on x86 and get_odr_type (t2,
> true) works on ARM/SPARC, so maybe something like:
>
> Index: ipa-devirt.c
> ===================================================================
> --- ipa-devirt.c (revision 258068)
> +++ ipa-devirt.c (working copy)
> @@ -686,7 +686,10 @@ odr_subtypes_equivalent_p (tree t1, tree t2,
> return false;
> /* Limit recursion: If subtypes are ODR types and we know
> that they are same, be happy. */
> - if (!odr_type_p (t1) || !get_odr_type (t1, true)->odr_violated)
> + if (!odr_type_p (t1)
> + || !odr_type_p (t2)
> + || (!get_odr_type (t1, true)->odr_violated
> + && !get_odr_type (t2, true)->odr_violated))
> return true;
> }
>
> is the proper thing to do.
This brings the missing warnings on SPARC (and presumably Aarch64 too) but
gives the same order of warnings as on the HP-PA, so the test still formally
fails.
In other words, the test is not sufficiently robust as currently written.