I have just spent a couple of hours refactoring a load of code by using the option to name DO loops (never done this before, bit newfangled for my taste 8) ). I found that there seemed to be inconsistencies between the rules as outlined in the help file and as implemented during compilation. So I had a look at Metcalf & Reid.
If we take M&R as gospel, then both the help file and FTN95 need tightening up a bit. According to M&R, the only rule for naming a DO construct is: The DO and END DO statements must either both bear the same name, or both be unnamed' (p.67).
Relative to this, the help file commits both an error of commission and (as a result) an error of omission. It says: 'If a DO construct is named then the same name, must be appended to EXIT and CYCLE' (wrong). What it *should *say is 'If a DO construct is named then the same name must be appended to the matching END DO'.
More importantly, FTN95 acts incorrectly. The following code compiles without error:
program donominator
main: do
exit
end do
stop
end program donominator