path: root/config.tests
diff options
authorThiago Macieira <>2019-02-05 13:55:14 -0800
committerThiago Macieira <>2019-02-06 08:11:29 +0000
commit37352b23a90e9b4550b5a5cef175f2a77598faa0 (patch)
tree214891c8ad94ea3de425e82b95457fab57e13de1 /config.tests
parentb319d141105044f612ada1efe62685b2c5dd4514 (diff)
x86: Disable AVX support on 64-bit MinGW
GCC for 64-bit Windows has a bug that it fails to properly re-align the stack pointer for use with 256-bit memory addresses (AVX). Therefore, there's about a 50/50 chance that any function using AVX will have an improperly-aligned stack. In release mode, stack accesses should be rare, but in debug mode they happen frequently. Either way, this is a ticking time bomb, so we disable. Clang is not affected. 32-bit MinGW is not affected. 64-bit in other OSes with GCC are not affected. Fixes: QTBUG-73539 Change-Id: Id061f35c088044b69a15fffd1580967808f31671 Reviewed-by: Allan Sandfeld Jensen <>
Diffstat (limited to 'config.tests')
1 files changed, 3 insertions, 0 deletions
diff --git a/config.tests/x86_simd/main.cpp b/config.tests/x86_simd/main.cpp
index 8120cb9d3f..4fac13973a 100644
--- a/config.tests/x86_simd/main.cpp
+++ b/config.tests/x86_simd/main.cpp
@@ -144,6 +144,9 @@ attribute_target("sha") void test_shani()
#if T(AVX)
+# if defined(__WIN64__) && defined(__GNUC__) && !defined(__clang__)
+# error "AVX support is broken in 64-bit MinGW -"
+# endif
attribute_target("avx") void test_avx()
__m256d a = _mm256_setzero_pd();