[Openmp-commits] [openmp] 4b9c089 - [OpenMP] [test] Skip the -mlong-double-80 test on MSVC ABI (#81115)

via Openmp-commits openmp-commits at lists.llvm.org
Mon Feb 19 01:33:32 PST 2024


Author: Martin Storsjö
Date: 2024-02-19T11:33:28+02:00
New Revision: 4b9c089381f7bd9a757d3926091205d70fcc9964

URL: https://github.com/llvm/llvm-project/commit/4b9c089381f7bd9a757d3926091205d70fcc9964
DIFF: https://github.com/llvm/llvm-project/commit/4b9c089381f7bd9a757d3926091205d70fcc9964.diff

LOG: [OpenMP] [test] Skip the -mlong-double-80 test on MSVC ABI (#81115)

Within the MSVC ABI, long doubles are the same as regular 64 bit
doubles. This test case, which is compiled with -mlong-double-80, cannot
work when libomp has been compiled without that flag, as
-mlong-double-80 changes the calling convention for the tested
functions.

Added: 
    

Modified: 
    openmp/runtime/test/atomic/kmp_atomic_float10_max_min.c

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/test/atomic/kmp_atomic_float10_max_min.c b/openmp/runtime/test/atomic/kmp_atomic_float10_max_min.c
index 82d8cbc19d7a16..72ba1eeb643ef1 100644
--- a/openmp/runtime/test/atomic/kmp_atomic_float10_max_min.c
+++ b/openmp/runtime/test/atomic/kmp_atomic_float10_max_min.c
@@ -28,7 +28,7 @@ extern long double __kmpc_atomic_float10_min_cpt(ident_t *id_ref, int gtid,
 
 int main() {
   int ret = 0;
-#if KMP_ARCH_X86 || KMP_ARCH_X86_64
+#if (KMP_ARCH_X86 || KMP_ARCH_X86_64) && !defined(_MSC_VER)
   long double s = 012.3456; // small
   long double e = 123.4567; // middle
   long double d = 234.5678; // big
@@ -158,6 +158,6 @@ int main() {
     printf("passed\n");
 #else
   printf("Unsupported architecture, skipping test...\n");
-#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
+#endif // (KMP_ARCH_X86 || KMP_ARCH_X86_64) && !defined(_MSC_VER)
   return ret;
 }


        


More information about the Openmp-commits mailing list