[PATCH] D100989: [flang] Fix checking of argument passing for parameterized derived types

Pete Steinfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 12:15:03 PDT 2021


PeteSteinfeld created this revision.
PeteSteinfeld added reviewers: klausler, tskeith.
Herald added a reviewer: sscalpone.
PeteSteinfeld requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We were erroneously not taking into account the constant values of LEN type
parameters of parameterized derived types when checking for argument
compatibility.  The required checks are identical to those for assignment
compatibility.  Since argument compatibility is checked in .../lib/Evaluate and
assignment compatibility is checked in .../lib/Semantics, I moved the common
code into .../lib/Evaluate/tools.cpp and changed the assignment compatibility
checking code to call it.

After implementing these new checks, tests in resolve53.f90 were failing
because the tests were erroneous.  I fixed these tests and added new tests
to call03.f90 to test argument passing of parameterized derived types more
completely.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100989

Files:
  flang/include/flang/Evaluate/tools.h
  flang/lib/Evaluate/tools.cpp
  flang/lib/Evaluate/type.cpp
  flang/lib/Semantics/type.cpp
  flang/test/Semantics/call03.f90
  flang/test/Semantics/resolve53.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100989.339341.patch
Type: text/x-patch
Size: 8097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210421/a55053ec/attachment.bin>


More information about the llvm-commits mailing list