https://gcc.gnu.org/g:c9fceb8f580da58efbc6d483522156a91240c810

commit c9fceb8f580da58efbc6d483522156a91240c810
Author: Alexandre Oliva <ol...@adacore.com>
Date:   Thu May 15 05:11:06 2025 -0300

    [testsuite] [vxworks] tolerate missing __atomic_feraiseexcept
    
    vxworks' libatomic comes from its libc, and it's missing
    __atomic_feraiseexcept.  ARM and AArch64 ports call it implicitly in
    c11-atomic-exec-[23].c, so these tests fail.
    
    No exceptions are expected to be raised by these tests, so I'm working
    around and silencing the failures by defining the missing function
    when compiling for the affected target.
    
    
    for  gcc/testsuite/ChangeLog
    
            * gcc.dg/atomic/c11-atomic-exec-2.c [__VXWORKS__]
            (__atomic_feraiseexcept): Define.
            * gcc.dg/atomic/c11-atomic-exec-3.c: Likewise.

Diff:
---
 gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-2.c | 10 ++++++++++
 gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-3.c | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-2.c 
b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-2.c
index 3e75096243e0..0f80b5b90822 100644
--- a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-2.c
+++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-2.c
@@ -7,6 +7,16 @@
 extern void abort (void);
 extern void exit (int);
 
+#ifdef __VXWORKS__
+/* vxworks offers libatomic in libc, but not __atomic_feraiseexcept.  No FP
+   exceptions are expected in this testcase, so define the symbol so that the
+   remainder of the test gets a chance to run.  */
+void
+__atomic_feraiseexcept (int excepts __attribute__ ((__unused__)))
+{
+}
+#endif
+
 #define CMPLX(X, Y) __builtin_complex ((X), (Y))
 
 #define TEST_COMPOUND(TYPE, LHSVAL, RHSVAL, OP)                                
\
diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-3.c 
b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-3.c
index 7bfa8c05f96c..066f4ae249f7 100644
--- a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-3.c
+++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-3.c
@@ -6,6 +6,16 @@
 extern void abort (void);
 extern void exit (int);
 
+#ifdef __VXWORKS__
+/* vxworks offers libatomic in libc, but not __atomic_feraiseexcept.  No FP
+   exceptions are expected in this testcase, so define the symbol so that the
+   remainder of the test gets a chance to run.  */
+void
+__atomic_feraiseexcept (int excepts __attribute__ ((__unused__)))
+{
+}
+#endif
+
 #define TEST_INCDEC(TYPE, VALUE, PREOP, POSTOP, PRE_P, CHANGE)         \
   do                                                                   \
     {                                                                  \

Reply via email to