vcpkg/ports/ampl-mp/workaround-msvc-optimizer-ice.patch

29 lines
839 B
Diff
Raw Normal View History

diff --git a/src/asl/solvers/avltree.c b/src/asl/solvers/avltree.c
index 7a9adaba..4dd97054 100644
--- a/src/asl/solvers/avltree.c
+++ b/src/asl/solvers/avltree.c
@@ -54,6 +54,9 @@ AVL_Tree {
void (*Free)(void*);
};
+#if defined(_MSC_VER) && _MSC_VER < 1917
+#pragma optimize("", off)
+#endif
AVL_Tree*
AVL_Tree_alloc2(void *v, AVL_Elcomp cmp, void *(*Malloc)(size_t), void (*Free)(void*))
{
diff --git a/src/asl/solvers/sphes.c b/src/asl/solvers/sphes.c
index 326d997f..ae8952ed 100644
--- a/src/asl/solvers/sphes.c
+++ b/src/asl/solvers/sphes.c
@@ -452,6 +452,9 @@ compar(const void *a, const void *b)
#undef del_mblk
#define del_mblk(b,c) Del_mblk_ASL(a,b,(Char*)(c))
+#if defined(_MSC_VER) && _MSC_VER < 1917
+#pragma optimize("", off)
+#endif
static void
new_Hesoprod(ASL_pfgh *asl, ograd *L, ograd *R, real coef)
{