From 004d81a852314741c0591a4a1dca9d7a3169f712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Tue, 10 Feb 2026 01:50:57 +0000 Subject: [PATCH] Fix cblat3/zblat3 test program with gfortran. libeigen/eigen!2122 --- blas/testing/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/blas/testing/CMakeLists.txt b/blas/testing/CMakeLists.txt index f0ee6a487..8b8ff44fd 100644 --- a/blas/testing/CMakeLists.txt +++ b/blas/testing/CMakeLists.txt @@ -48,5 +48,13 @@ ei_add_blas_test(zblat3) # add_custom_target(level1) # add_dependencies(level1 sblat1) +# Workaround for gfortran -O3 bug. The optimization +# introduces a bug in the calculation of the norm of the error +# in the complex case. +if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") + target_compile_options(cblat3 PRIVATE "-O0") + target_compile_options(zblat3 PRIVATE "-O0") +endif() + endif()