Consider a simple case where main.f90 depends on mod1.f90.
! In main.f90
program main
use mod1, only: sub1
integer :: c
call sub1(c, 1, 2)
write(*, '(i0)') c
end program main
! In mod1.f90
module mod1
contains
subroutine sub1(c, a, b)
integer, intent(out) :: c
integer, intent(in) :: a
integer, intent(in) :: b
c = a + b + 1
end subroutine sub1
end module mod1
Some compiler (e.g. Cray), on -O3, may inline logic of mod1.f90 into main.o. If we subsequently change the line c = a + b + 1 to say c = a + b + 20, the module will be recompiled, updating mod1.o but mod1.mod will remain unchanged - as there is no change to the module interface. This causes fcm make to think that it does not need to recompile main.f90, although it will re-link the executable.
The result of the executable will then be wrong in incremental mode.
Consider a simple case where
main.f90depends onmod1.f90.Some compiler (e.g. Cray), on
-O3, may inline logic ofmod1.f90intomain.o. If we subsequently change the linec = a + b + 1to sayc = a + b + 20, the module will be recompiled, updatingmod1.obutmod1.modwill remain unchanged - as there is no change to the module interface. This causesfcm maketo think that it does not need to recompilemain.f90, although it will re-link the executable.The result of the executable will then be wrong in incremental mode.