Skip to content

Commit d2d2625

Browse files
committed
Disable constant propagation for the NAG Fortran compiler in BLAS tests.
1 parent 66380df commit d2d2625

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

BLAS/TESTING/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ macro(add_blas_test name src)
1515
-DINTDIR=${CMAKE_CFG_INTDIR}
1616
-P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
1717
endif()
18+
19+
# Disable constant propagation for NAG compiler to avoid issues with
20+
# special values (Inf, NaN) returned by SXVALS and DXVALS.
21+
if(CMAKE_Fortran_COMPILER_ID STREQUAL "NAG")
22+
target_compile_options(${name} PRIVATE "-Onopropagate")
23+
endif()
1824
endmacro()
1925

2026
if(BUILD_SINGLE)

0 commit comments

Comments
 (0)