[Openmp-commits] [PATCH] D95627: [OpenMP] libomp: fix Windows build by vs2019
Andrey Churbanov via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jan 28 08:46:24 PST 2021
AndreyChurbanov created this revision.
AndreyChurbanov added reviewers: Nawrin, hbae, jlpeyton.
AndreyChurbanov added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
AndreyChurbanov requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
This is a fix for https://bugs.llvm.org/show_bug.cgi?id=48919.
VLA replaced with alloca.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95627
Files:
openmp/runtime/src/kmp_settings.cpp
Index: openmp/runtime/src/kmp_settings.cpp
===================================================================
--- openmp/runtime/src/kmp_settings.cpp
+++ openmp/runtime/src/kmp_settings.cpp
@@ -3377,7 +3377,8 @@
ntraits++;
}
}
- omp_alloctrait_t traits[ntraits];
+ omp_alloctrait_t *traits =
+ (omp_alloctrait_t *)KMP_ALLOCA(ntraits * sizeof(omp_alloctrait_t));
// Helper macros
#define IS_POWER_OF_TWO(n) (((n) & ((n)-1)) == 0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95627.319884.patch
Type: text/x-patch
Size: 458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210128/85457b14/attachment-0001.bin>
More information about the Openmp-commits
mailing list