From b4f4ed378b2343b0af8b1235838feef4f6c8c51c Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Fri, 30 Jul 2021 14:21:08 +0200 Subject: [PATCH] Disable gfortran tree vectorizer to avoid gcc11+ miscompilation at O3 --- test/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d338242ff..e4ee8b28b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,6 +2,10 @@ include_directories(${PROJECT_SOURCE_DIR}) include_directories(${PROJECT_BINARY_DIR}) enable_language(Fortran) +if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-tree-vectorize") +endif() + if (BUILD_SINGLE) list( APPEND OpenBLAS_Tests sblat1 sblat2 sblat3)