[gcc(refs/users/aoliva/heads/testme)] [PR105224] C++ modules and AAPCS/ARM EABI clash on inline key methods

Alexandre Oliva aoliva@gcc.gnu.org
Thu Feb 23 13:57:41 GMT 2023


https://gcc.gnu.org/g:029804ffbe848dd6add65d72a7847d9f4545fed7

commit 029804ffbe848dd6add65d72a7847d9f4545fed7
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 23 10:31:30 2023 -0300

    [PR105224] C++ modules and AAPCS/ARM EABI clash on inline key methods
    
    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, so skip it on
    arm_eabi.
    
    
    for  gcc/testsuite/ChangeLog
    
            PR c++/105224
            * g++.dg/modules/virt-2_a.C: Skip on arm_eabi.

Diff:
---
 gcc/testsuite/g++.dg/modules/virt-2_a.C | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/g++.dg/modules/virt-2_a.C b/gcc/testsuite/g++.dg/modules/virt-2_a.C
index 580552be5a0..8f9ede3427d 100644
--- a/gcc/testsuite/g++.dg/modules/virt-2_a.C
+++ b/gcc/testsuite/g++.dg/modules/virt-2_a.C
@@ -1,4 +1,6 @@
-// { dg-module-do run }
+// AAPCS overrides TARGET_CXX_KEY_METHOD_MAY_BE_INLINE,
+// in a way that invalidates this test.
+// { dg-module-do run { target { ! arm_eabi } } }
 // { dg-additional-options -fmodules-ts }
 export module foo;
 // { dg-module-cmi foo }
@@ -22,6 +24,6 @@ export int Visit (Visitor *v)
 }
 
 // Emit here
-// { dg-final { scan-assembler {_ZTVW3foo7Visitor:} } }
-// { dg-final { scan-assembler {_ZTIW3foo7Visitor:} } }
-// { dg-final { scan-assembler {_ZTSW3foo7Visitor:} } }
+// { dg-final { scan-assembler {_ZTVW3foo7Visitor:} }
+// { dg-final { scan-assembler {_ZTIW3foo7Visitor:} }
+// { dg-final { scan-assembler {_ZTSW3foo7Visitor:} }


More information about the Gcc-cvs mailing list