[all-commits] [llvm/llvm-project] e9be1e: [flang] Fix checking of argument passing for param...

Pete Steinfeld via All-commits all-commits at lists.llvm.org
Thu Apr 22 08:50:26 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9be1e7d843bed90f1270c113823534bdb308eb0
      https://github.com/llvm/llvm-project/commit/e9be1e7d843bed90f1270c113823534bdb308eb0
  Author: Peter Steinfeld <psteinfeld at nvidia.com>
  Date:   2021-04-22 (Thu, 22 Apr 2021)

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

  Log Message:
  -----------
  [flang] Fix checking of argument passing for parameterized derived types

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.

Differential Revision: https://reviews.llvm.org/D100989




More information about the All-commits mailing list