Open pjh40 opened 2 days ago
I see --- I wasn't sure if you can put labels before declaration statements also. I think we need to first fix #5273, and then it should be easy to just allow a label before any statement.
P.S. Is there any usage of labels before declarations? I am assuming you can't "goto" or "enddo" them, so not sure what else I could do with them.
No, there is no use of them apart from branch targets or FORMAT
statements. The FVCS_95 suites test for it though, so I'd guess we'd encounter them in the wild. Probably had something to do with numbering cards for sorting.
Attempting to parse
with LFortran SHA 4068df32ee4 gives the error:
Section 6.2.5 "Statement labels" of the the F23 standard states:
This syntax is supported by GCC.