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

commit r16-6708-gc885d2a055828dfbeb30208a1a8a50dcef0004d8
Author: Rainer Orth <[email protected]>
Date:   Mon Jan 12 10:36:19 2026 +0100

    libgomp: Skip libgomp.c++/target-cdtor-2.C on Solaris [PR81337]
    
    The libgomp.c++/target-cdtor-2.C test FAILs on Solaris:
    
    FAIL: libgomp.c++/target-cdtor-2.C output pattern test
    
    Compared to the Linux output
    
    ~S, 5, 1
    [...]
    finiDH1, 1
    
    the Solaris output has a different order:
    
    finiDH1, 1
    [...]
    ~S, 5, 1
    
    This is another instance of the long-standing PR c++/81337.  As detailed
    there, the relative order of ~S::S() and __attribute__((destructor()))
    functions isn't guaranteed.  Since xfail'ing the dg-output parts isn't
    practical, this patch skips the whole test on Solaris.
    
    Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu.
    
    2025-12-16  Rainer Orth  <[email protected]>
    
            libgomp:
            PR c++/81337
            * testsuite/libgomp.c++/target-cdtor-2.C: Skip on Solaris.
            Fix comments.

Diff:
---
 libgomp/testsuite/libgomp.c++/target-cdtor-2.C | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/libgomp/testsuite/libgomp.c++/target-cdtor-2.C 
b/libgomp/testsuite/libgomp.c++/target-cdtor-2.C
index a673ddb6898c..e1e1ce73c92c 100644
--- a/libgomp/testsuite/libgomp.c++/target-cdtor-2.C
+++ b/libgomp/testsuite/libgomp.c++/target-cdtor-2.C
@@ -1,10 +1,12 @@
 /* Offloaded 'constructor' and 'destructor' functions, and C++ objects 
construction and destruction.  */
 
 /* { dg-require-effective-target init_priority } */
+/* { dg-skip-if "PR c++/81337: destructor ordering" { *-*-solaris2* } } */
+
+/* { dg-additional-options -fdump-tree-optimized-raw-asmname } */
+/* { dg-additional-options -foffload-options=-fdump-tree-optimized-raw-asmname 
} */
+/* { dg-additional-options "-Wno-deprecated-openmp" } */
 
-/* { dg-additional-options -fdump-tree-optimized-raw-asmname }
-   { dg-additional-options -foffload-options=-fdump-tree-optimized-raw-asmname 
} */
-// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <omp.h>
 #include <vector>

Reply via email to