Targets that don't have -fuse-cxa-atexit enabled by default don't get
the expected __tcf_ZL1b symbol. Require and enable the use of
cxa_atexit.
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/modules/pr98893_b.C: Require and enable cxa_atexit.
---
gcc/testsuite/g++.dg/modules/pr98893_b.C | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/testsuite/g++.dg/modules/pr98893_b.C
b/gcc/testsuite/g++.dg/modules/pr98893_b.C
index 692eafb0afdce..386e58724dee3 100644
--- a/gcc/testsuite/g++.dg/modules/pr98893_b.C
+++ b/gcc/testsuite/g++.dg/modules/pr98893_b.C
@@ -1,4 +1,6 @@
// { dg-additional-options "-fmodules" }
+// { dg-require-effective-target cxa_atexit }
+// { dg-additional-options "-fuse-cxa-atexit" }
import "pr98893_a.H";
static S b[1];
--
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!