[flang-commits] [PATCH] D117151: [flang] Implement semantics for DEC STRUCTURE/RECORD
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Jan 12 14:04:33 PST 2022
klausler created this revision.
klausler added a reviewer: PeteSteinfeld.
klausler added a project: Flang.
Herald added subscribers: Chia-hungDuan, rriddle, jdoerfert.
Herald added a reviewer: sscalpone.
klausler requested review of this revision.
Herald added a subscriber: stephenneuendorffer.
Implements part of the legacy "DEC structures" feature from
VMS Fortran. STRUCTUREs are processed as if they were derived
types with SEQUENCE. DATA-like object entity initialization
is supported as well (e.g., INTEGER FOO/666/) since it was used
for default component initialization in structures. Anonymous
components (named %FILL) are also supported.
These features, and UNION/MAP, were already being parsed.
An omission in the collection of structure field names in the
case of nested structures with entity declarations was fixed
in the parser.
Structures are supported in modules, but this is mostly for
testing purposes. The names of fields in structures accessed
via USE association cannot appear with dot notation in client
code (at least not yet). DEC structures antedate Fortran 90,
so their actual use in applications should not involve modules.
This patch does not implement UNION/MAP, since that feature
would impose difficulties later in lowering them to MLIR types.
In the meantime, if they appear, semantics will issue a
"not yet implemented" error message.
https://reviews.llvm.org/D117151
Files:
flang/docs/Extensions.md
flang/include/flang/Common/unwrap.h
flang/include/flang/Parser/dump-parse-tree.h
flang/include/flang/Parser/parse-tree.h
flang/include/flang/Parser/tools.h
flang/include/flang/Parser/user-state.h
flang/include/flang/Semantics/expression.h
flang/include/flang/Semantics/semantics.h
flang/include/flang/Semantics/symbol.h
flang/lib/Evaluate/fold-designator.cpp
flang/lib/Parser/Fortran-parsers.cpp
flang/lib/Parser/unparse.cpp
flang/lib/Parser/user-state.cpp
flang/lib/Semantics/check-data.cpp
flang/lib/Semantics/check-data.h
flang/lib/Semantics/data-to-inits.cpp
flang/lib/Semantics/data-to-inits.h
flang/lib/Semantics/mod-file.cpp
flang/lib/Semantics/mod-file.h
flang/lib/Semantics/resolve-names.cpp
flang/lib/Semantics/runtime-type-info.cpp
flang/lib/Semantics/semantics.cpp
flang/lib/Semantics/type.cpp
flang/test/Semantics/modfile42.f90
flang/test/Semantics/struct01.f90
flang/test/Semantics/symbol15.f90
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117151.399449.patch
Type: text/x-patch
Size: 58294 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220112/ea602117/attachment-0001.bin>
More information about the flang-commits
mailing list