This is an archive of the discontinued LLVM Phabricator instance.

[flang] Format label scope is independent of block scope
ClosedPublic

Authored by klausler on Aug 31 2020, 11:53 AM.

Details

Summary

Compilation of the following program currently generates a warning message:

i = 1
if (i .eq. 0) then
write(6, 200) i
200 format (I8)
end if
write(6, 200) i
end

x.f90:6:9: Label '200' is not in scope
write(6, 200) i
^^^^^^^^^^^^^^^

Whereas branch targets must conform to the Clause 11.1.2.1 program
requirement "Transfer of control to the interior of a block from
outside the block is prohibited, ...", this doesn't apply to format
statement references.

Diff Detail

Event Timeline

klausler created this revision.Aug 31 2020, 11:53 AM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.Aug 31 2020, 11:54 AM
PeteSteinfeld accepted this revision.Aug 31 2020, 12:13 PM

All builds, tests, and looks good.

This revision is now accepted and ready to land.Aug 31 2020, 12:13 PM
klausler closed this revision.Aug 31 2020, 1:37 PM