You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
containssubroutinesub1(c, a, b)
integer, intent(out) :: c
integer, intent(in) :: a
integer, intent(in) :: b
c = a + b + 1endsubroutine 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.
The text was updated successfully, but these errors were encountered:
Consider a simple case where
main.f90
depends onmod1.f90
.Some compiler (e.g. Cray), on
-O3
, may inline logic ofmod1.f90
intomain.o
. If we subsequently change the linec = a + b + 1
to sayc = a + b + 20
, the module will be recompiled, updatingmod1.o
butmod1.mod
will remain unchanged - as there is no change to the module interface. This causesfcm make
to 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.
The text was updated successfully, but these errors were encountered: