program main ! labelled without enddo (normal) do 10 i = 0, 5 acc = acc + 1 10 continue ! multiple labelled sharing same non-enddo final do 20 i = 0, 3 do 20 j = 0, 5 20 print *, "ok" ! multiple labelled AND named sharing same non-enddo final ! TODO: I can't tell if labelled+named is in the spec. We don't support it ! for now, though it's probably? pretty easy. ! outer: do 25 i = 0, 3 ! inner: do 25 j = 0, 5 !25 print *, "ok" ! labelled but using END DO (F90 unusual) ! NOTE: This is the main problematic construction. END DOs can also end ! nonblock DOs, so we're stuffed. We get reduce-reduce errors in Happy, and ! I don't know of a way to reconcile them. We'd need to select one of two ! rules (with wildly different types) for the same expansion, depending on ! context. I don't think Happy is that. do 30 i = 0, 42 print *, i 30 end do ! unlabelled (F90 normal) do i = 0, 42 print *,i end do ! unlabelled using enddo (normal) end program main