[all-commits] [llvm/llvm-project] 205b47: [flang] Fix the trivial type passed as value with ...

PeixinQiao via All-commits all-commits at lists.llvm.org
Mon Oct 17 08:27:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 205b47401ed6517cc34e473838e1d307715cc9a4
      https://github.com/llvm/llvm-project/commit/205b47401ed6517cc34e473838e1d307715cc9a4
  Author: Peixin Qiao <qiaopeixin at huawei.com>
  Date:   2022-10-17 (Mon, 17 Oct 2022)

  Changed paths:
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/CallInterface.cpp
    M flang/test/Lower/call-by-value.f90
    M flang/test/Lower/call.f90

  Log Message:
  -----------
  [flang] Fix the trivial type passed as value with bind(C)

In the callee side, the value cannot be used directly. For example, the
dummy argument is lhs variable or the dummy argument is passed to
another procedure as actual argument.

Fix this by allocating one temporary storage and store the value. Then
map the symbol of dummy argument to the `mlir::Value` of the temporary.

Reviewed By: jeanPerier

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




More information about the All-commits mailing list