On Mar 31, 2022, Alexandre Oliva <ol...@adacore.com> wrote:

> g++.dg/modules/virt-2_a.C fails on arm-eabi and many other arm targets
> that use the AAPCS variant.  ARM is the only target that overrides
> TARGET_CXX_KEY_METHOD_MAY_BE_INLINE.  It's not clear to me which way the
> clash between AAPCS and C++ Modules design should be resolved, but
> currently it favors AAPCS and thus the test fails.

> Should we skip the test on ARM, XFAIL it, or put in some kludge like
> the patchlet below?

That kludge doesn't work: subsequent virt tests fail with it, on arm.

Would something like this be acceptable/desirable?  It's overreaching,
in that not all arm platforms are expected to fail, but the result on
them will be an unexpected pass, which is not quite as bad as the
unexpected fail we get on most arm variants now.


diff --git a/gcc/testsuite/g++.dg/modules/virt-2_a.C 
b/gcc/testsuite/g++.dg/modules/virt-2_a.C
index 9115cc19cc286..0b780645708ba 100644
--- a/gcc/testsuite/g++.dg/modules/virt-2_a.C
+++ b/gcc/testsuite/g++.dg/modules/virt-2_a.C
@@ -22,6 +22,6 @@ export int Visit (Visitor *v)
 }
 
 // Emit here
-// { dg-final { scan-assembler {_ZTV7Visitor:} } }
-// { dg-final { scan-assembler {_ZTI7Visitor:} } }
-// { dg-final { scan-assembler {_ZTS7Visitor:} } }
+// { dg-final { scan-assembler {_ZTV7Visitor:} { xfail arm*-*-* } } }
+// { dg-final { scan-assembler {_ZTI7Visitor:} { xfail arm*-*-* } } }
+// { dg-final { scan-assembler {_ZTS7Visitor:} { xfail arm*-*-* } } }


-- 
Alexandre Oliva, happy hacker                https://FSFLA.org/blogs/lxo/
   Free Software Activist                       GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about <https://stallmansupport.org>

Reply via email to