[all-commits] [llvm/llvm-project] d3c0dd: [flang] Fix the interface for numerical/logical sc...

PeixinQiao via All-commits all-commits at lists.llvm.org
Fri Oct 21 18:16:05 PDT 2022


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

  Changed paths:
    M flang/lib/Lower/CallInterface.cpp
    M flang/test/Lower/array-elemental-calls-2.f90
    M flang/test/Lower/array-elemental-calls.f90
    M flang/test/Lower/array-elemental-subroutines.f90
    M flang/test/Lower/array-expression.f90
    M flang/test/Lower/call-by-value-attr.f90

  Log Message:
  -----------
  [flang] Fix the interface for numerical/logical scalar with VALUE attribute

Programmers may use procedure without BIND(C) attribute to interoperate
with C code. For numerical/logical scalar with VALUE attribute, pass the
argument by value so that the behavior is consistent with gfortran or
nvfortran. The argument with the OPTIONAL attribute cannot be passed by
value since the actual argument may be absent.

For the derived type, pass-by-value is not supported yet, so pass the
argument by reference for now.

Reviewed By: jeanPerier

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




More information about the All-commits mailing list