diff --git a/cmake/Compiler-GNU.cmake b/cmake/Compiler-GNU.cmake index 1089e73f1..b9a7406dc 100644 --- a/cmake/Compiler-GNU.cmake +++ b/cmake/Compiler-GNU.cmake @@ -131,8 +131,10 @@ set (DEBUG_FLAGS "${DEBUG_FLAGS} -fcheck=all") set (DEBUG_FLAGS "${DEBUG_FLAGS} -fstack-protector-all") # Inserts a guard variable onto the stack frame for all functions -# Detect memory leaks -# -fsanitize=address +set (DEBUG_FLAGS "${DEBUG_FLAGS} -fsanitize=undefined") +# detect undefined behavior +# Additional options +# -fsanitize=address,leak,thread #------------------------------------------------------------------------------------------------ # precision settings diff --git a/src/phase_mechanical_plastic_nonlocal.f90 b/src/phase_mechanical_plastic_nonlocal.f90 index e4e008fab..2ceaea7e2 100644 --- a/src/phase_mechanical_plastic_nonlocal.f90 +++ b/src/phase_mechanical_plastic_nonlocal.f90 @@ -1819,7 +1819,7 @@ subroutine storeGeometry(ph) integer, intent(in) :: ph - integer :: ip, el, ce, co + integer :: ce, co real(pReal), dimension(:), allocatable :: V