
subroutine sub_save_stmt(x)
    use iso_c_binding, only: c_int32_t
	integer(c_int32_t) x
	integer(c_int32_t) y
    save y
	y = y + 10
	x = y
end

program example
  use iso_c_binding, only: c_int32_t

  integer(c_int32_t) i
  integer(c_int32_t) j

  do i=1,4
    call sub_save_stmt(j)
    print *, ' j = ', j
  enddo
end 
