You are not resetting the value of y
in your outer loop, so after y
increments to 3, it is never again less than 3. You should try:
x=1.d0
do while (x<5.0)
y=1.d0
do while (y<3.0)
print*,'x=',x,' y=',y
y=y+1.d0
end do
print*,'x================',x
x=x+1.d0
end do