[flang-commits] [PATCH] D146579: [flang] Move SAVE attribute checks to declaration checking

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Mar 21 15:10:35 PDT 2023


klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added subscribers: sunshaoce, jdoerfert.
Herald added a project: All.
klausler requested review of this revision.

Constraint checking for explicit SAVE attributes is more
accurate when done along with other declaration checking, rather
than on the fly during name resolution.  This allows us to   
catch attempts to attach explicit SAVE attributes to anything
that can't have one (constraints C859, C860).

Also delete `IsSave()`, whose few remaining uses were changed to the
more general `IsSaved()` predicate that seems more correct for
those uses, returning true for both explicit and implied SAVE
attributes.


https://reviews.llvm.org/D146579

Files:
  flang/include/flang/Semantics/tools.h
  flang/lib/Semantics/check-declarations.cpp
  flang/lib/Semantics/check-omp-structure.cpp
  flang/lib/Semantics/resolve-names-utils.cpp
  flang/lib/Semantics/resolve-names.cpp
  flang/test/Lower/host-associated-globals.f90
  flang/test/Semantics/resolve45.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146579.507149.patch
Type: text/x-patch
Size: 12392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230321/a28d1814/attachment-0001.bin>


More information about the flang-commits mailing list