https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958
--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- If it is forbidden to modify an actual argument, we could make a tempoary copy of that argument, pass that to a procedure where it maches an intent(unknown) dummy argument, then do the comparison. So, we would replace subroutine bar(n) integer, intent(in) :: n call dusty(n) end subroutine bar with subroutine bar(n) integer, intent(in) :: n integer :: shadow_n shadow_n = n call dusty(shadow_n) if (n /= shadow_n) call _gfortran_runtime_error("bletchful") end subroutine bar where dusty has no explicit interface or the first dummy argument of dusty has unknown intent. It would probably make most sense for scalar intrinsic types inculding character variables. Arrays of intrinsic types might also be a possibility, but with decreasing return on investment, so to speak.