[all-commits] [llvm/llvm-project] 5c4280: [flang][hlfir] Fixed byval passing for dynamically...

Slava Zakharin via All-commits all-commits at lists.llvm.org
Tue Jul 11 09:41:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c428079047b5ef35f6452c6cd2b3fc3d4323a17
      https://github.com/llvm/llvm-project/commit/5c428079047b5ef35f6452c6cd2b3fc3d4323a17
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M flang/lib/Lower/ConvertCall.cpp
    M flang/test/Lower/HLFIR/intrinsic-dynamically-optional.f90

  Log Message:
  -----------
  [flang][hlfir] Fixed byval passing for dynamically optional intrinsic args.

In the context of elemental operation a dynamically optional
intrinsic argument must be lowered such that the elemental
designator is generated under isPresent check.

Reviewed By: tblah

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


  Commit: 07593a39a4f67186200df0f874d8dadf5f836797
      https://github.com/llvm/llvm-project/commit/07593a39a4f67186200df0f874d8dadf5f836797
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M flang/lib/Lower/ConvertExprToHLFIR.cpp
    M flang/test/Lower/HLFIR/structure-constructor.f90

  Log Message:
  -----------
  [flang][hlfir] Fixed NULL() handling in structure constructor.

When an initializer value is missing for an allocatable component
in a structure constructor, the RHS is NULL() expression.
We should just skip this part of the initializer, since the component
must become unallocated (as it is from the initialization).
Runtime detected rank mismatch when we tried to pass NULL() box
RHS for assigning it to the unallocated component of rank 1, 2, etc.

Reviewed By: tblah

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


Compare: https://github.com/llvm/llvm-project/compare/caf5b6a21217...07593a39a4f6


More information about the All-commits mailing list