[flang-commits] [PATCH] D145743: [flang] Forward references to COMMON from specification expr under IMPLICIT NONE

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Mar 9 16:30:20 PST 2023


klausler created this revision.
klausler added reviewers: PeteSteinfeld, DavidTruby.
klausler added a project: Flang.
Herald added subscribers: sunshaoce, jdoerfert.
Herald added a project: All.
klausler requested review of this revision.

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 <https://reviews.llvm.org/F18> implemented this extension for dummy arguments, but not variables in
COMMON blocks.  Extend the extension to also accept variables in COMMON.


https://reviews.llvm.org/D145743

Files:
  flang/docs/Extensions.md
  flang/include/flang/Common/Fortran-features.h
  flang/lib/Semantics/resolve-names.cpp
  flang/test/Semantics/implicit11.f90
  flang/test/Semantics/resolve103.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145743.503968.patch
Type: text/x-patch
Size: 6846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230310/75480775/attachment.bin>


More information about the flang-commits mailing list