[PATCH] D78160: [flang] Checks for constraints C741 through C750

Pete Steinfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 09:06:38 PDT 2020


PeteSteinfeld updated this revision to Diff 260345.
PeteSteinfeld added a comment.
Herald added a subscriber: jfb.

- Merge branch 'master' of https://github.com/llvm/llvm-project
- Responses to review comments.

1. Updating D78160 <https://reviews.llvm.org/D78160>: [flang] Checks for constraints C741 through C750 #
2. Enter a brief description of the changes included in this update.
3. The first line is used as subject, next lines as comment. #
4. If you intended to create a new revision, use:
5. $ arc diff --create

I changed the test to see if a function is in intrinsic inquiry function from a
string comparison to a more general capability in the intrinsic proc table to
get the intrinsic class of a procedure.

I changed the test for intrinsics specific that are prohibited from use
specifically in derived type component bound declarations to be a set of
strings.

I changed the implementation of IsPureProcedure() to get the associated
symbol's SubprogramDetails to check for references to PURE procedures and
VOLATILE variables.

I made the error messages for bad declarations of derived type components to be
more consistent.

I removed the "%" in front of the component name in error messages relating to
bad component declarations.

I noticed that C750 prohibits non-constant specification inquiries and added a
test for specification inquiries that are type parameter inquiries which are
defined in 9.4.5.  I added a test for this case, which caused me to change the
implementation of "IsConstantExpr()" for "TypeParamInquiry"s and symbols.
Specifically, I now require that individual parts of a "TypeParamInquiry" to be
constant.  I also call a component of a derived type constant since the overall
"constant"ness of the expression will be determined by the enclosing derived
type object.

In the process of implementing this, I noticed that we really need a predicate
function to determine if an expression is a specification inquiry as defined in
10.1.11(5).  But I decided to defer the implementation of such a predicate to
later.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78160/new/

https://reviews.llvm.org/D78160

Files:
  flang/include/flang/Evaluate/check-expression.h
  flang/include/flang/Evaluate/intrinsics.h
  flang/lib/Evaluate/check-expression.cpp
  flang/lib/Evaluate/intrinsics.cpp
  flang/lib/Semantics/check-declarations.cpp
  flang/lib/Semantics/expression.cpp
  flang/lib/Semantics/resolve-names.cpp
  flang/lib/Semantics/tools.cpp
  flang/test/Semantics/allocate11.f90
  flang/test/Semantics/assign04.f90
  flang/test/Semantics/call10.f90
  flang/test/Semantics/call12.f90
  flang/test/Semantics/call14.f90
  flang/test/Semantics/misc-declarations.f90
  flang/test/Semantics/modfile24.f90
  flang/test/Semantics/resolve33.f90
  flang/test/Semantics/resolve44.f90
  flang/test/Semantics/resolve88.f90
  flang/test/Semantics/resolve89.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78160.260345.patch
Type: text/x-patch
Size: 62116 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200427/36741823/attachment.bin>


More information about the llvm-commits mailing list