If a condition is to be tested at the top of a loop a DO ... WHILE loop could be used,
DO WHILE (a .EQ. b) ... END DO
The loop only executes if the logical expression evaluates to .TRUE.. Clearly, here, the values of a or b must be modified within the loop otherwise it will never terminate.
The above loop is functionally equivalent to,
DO; IF (a .NE. b) EXIT ... END DO
For more information, click here