This is an archive of the discontinued LLVM Phabricator instance.

[flang] Forward references to COMMON from specification expr under IMPLICIT NONE
ClosedPublic

Authored by klausler on Mar 9 2023, 4:30 PM.

Details

Summary

As a near-universal extension, Fortran compilers permit forward references
to dummy arguments and variables in COMMON blocks from specification expressions
before an explicit type-declaration-stmt appears for those variables
under IMPLICIT NONE, so long as those variables are later explicitly typed
with the types that regular implicit typing rules would have given them
(usually default INTEGER).

F18 implemented this extension for dummy arguments, but not variables in
COMMON blocks. Extend the extension to also accept variables in COMMON.

Diff Detail

Event Timeline

klausler created this revision.Mar 9 2023, 4:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2023, 4:30 PM
klausler requested review of this revision.Mar 9 2023, 4:30 PM
PeteSteinfeld accepted this revision.Mar 10 2023, 6:24 AM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Mar 10 2023, 6:24 AM