https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106817
Bug ID: 106817 Summary: clobber ordering problem when an actual intent(in) argument depends on the value of an intent(out) argument Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: mikael at gcc dot gnu.org Target Milestone: --- module m implicit none contains subroutine copy(in, out) integer, intent(in) :: in integer, intent(out) :: out out = in end subroutine copy end module m program p use m implicit none integer :: a a = 3 call copy(a+1, a) if (a /= 4) stop 1 end program p The in value (a+1) depends on the value of a, but a is clobbered at the beginning of the call to copy, so we should make sure that we have evaluated a+1 before generating the clobber.