The _ZZZ1fB7__test1vEN1T1gEvE1x symbol is only output with the ABI tag
when cxa_atexit is available for use.  On targets that default to
-fno-use-cxa-atexit, the test fails gratuitously.  Add an explicit
-fuse-cxa-atexit, along with a requirement for cxa_atexit support.

Regstrapped on x86_64-linux-gnu.  Also tested with aarch64-elf and
arm-eabi with gcc-15.  Ok to install?


for  gcc/testsuite/ChangeLog

        * g++.dg/abi/abi-tag18a.C: Require and enable cxa_atexit.
---
 gcc/testsuite/g++.dg/abi/abi-tag18a.C |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/testsuite/g++.dg/abi/abi-tag18a.C 
b/gcc/testsuite/g++.dg/abi/abi-tag18a.C
index 392abf78062ac..57e4c6d4222a7 100644
--- a/gcc/testsuite/g++.dg/abi/abi-tag18a.C
+++ b/gcc/testsuite/g++.dg/abi/abi-tag18a.C
@@ -1,5 +1,7 @@
 // { dg-skip-if "PR 70349" { hppa*-*-hpux* } }
 // { dg-options "-fabi-version=9 -fno-implicit-constexpr" }
+// { dg-require-effective-target cxa_atexit }
+// { dg-additional-options "-fuse-cxa-atexit" }
 // { dg-final { scan-assembler "_Z1fB7__test1v" } }
 // { dg-final { scan-assembler "_ZZ1fB7__test1vEN1T1gB7__test2Ev" } }
 // { dg-final { scan-assembler "_ZZZ1fB7__test1vEN1T1gEvE1x" } }

-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to