Checkmate (/CHECK and /CHECKMATE) should generate a run time error when an attempt is made to modify a dummy argument when the corresponding actual argument is an expression.
I find this does not work for module procedures, but does work for external procedures. In the following code, suba is inside a module, subb is an external procedure. No runtime error occurs when suba is called, but the correct error occurs when subb is called.
Moreover, I have found that the following calls, which also have simple expressions for arguments (being parenthesised variables) are not detected at all!
call suba((k)) call subb((k))
Perhaps these inconsistencies could be addressed in some future revision.
I'm still using 6.10 here.
module foo
contains
subroutine suba(i)
print *, i
i = 6 !< Should get a run-time error here. But I don't!
end subroutine suba
end module foo
!********************************
subroutine subb(i)
print *, i
i = 6 !< Should get a run-time error here. And I do!
end subroutine subb
!********************************
program anon
use foo
integer :: k
k = 5
call suba(k*10)
print *, k
k = 5
call subb(k*10)
print *, k
end program anon