f18
f18 copied to clipboard
Weird warning from extended range unlabeled DO loop
do j=1,5
go to 1
2 continue
end do
go to 3
1 go to 2
3 continue
end
elicits "label '2' is not in scope" as a warning.
Are you saying the message needs to be improved?
I believe the warning is technically true. The goto 2
is jumping into a DO
construct.
The warning is distinct from the warning emitted for jumps into labeled DO
loops ("branch into loop body from outside", with a pointer to the loop), and confusing because it implies that labels have construct scope, which they don't have.
See about improving the error message if this is still around.