[Openmp-commits] [PATCH] D65868: [OpenMP] Remove workaround for CMPXCHG
Jonathan Peyton via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Aug 12 11:34:05 PDT 2019
jlpeyton requested changes to this revision.
jlpeyton added a comment.
This revision now requires changes to proceed.
Unfortunately, the Windows atomic code will not compile with this change. See in kmp_atomic.h the different atomic types for Windows. The complaints are regarding assignment operations for the complex types.
../../src/kmp_atomic.cpp(1325): error: class "__kmp_cmplx32_t" has no suitable assignment operator
ATOMIC_CMPXCHG(cmplx4, add, kmp_cmplx32, 64, +, 8c, 7,
^
You can simulate the build errors on Linux by applying:
diff --git a/src/kmp_atomic.h b/src/kmp_atomic.h
index a42421a..b45a474 100644
--- a/src/kmp_atomic.h
+++ b/src/kmp_atomic.h
@@ -55,7 +55,7 @@
// to use typedef'ed types on win.
// Condition for WIN64 was modified in anticipation of 10.1 build compiler.
-#if defined(__cplusplus) && (KMP_OS_WINDOWS)
+#if defined(__cplusplus) && (KMP_OS_WINDOWS || KMP_OS_LINUX)
// create shortcuts for c99 complex types
// Visual Studio cannot have function parameters that have the
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65868/new/
https://reviews.llvm.org/D65868
More information about the Openmp-commits
mailing list