[all-commits] [llvm/llvm-project] fb730e: [flang] Fixed initialization of c_ptr/c_funptr arr...

Slava Zakharin via All-commits all-commits at lists.llvm.org
Thu May 18 15:57:18 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb730e2b5883ad3c5d498910bf645e3e4affefed
      https://github.com/llvm/llvm-project/commit/fb730e2b5883ad3c5d498910bf645e3e4affefed
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M flang/lib/Lower/ConvertConstant.cpp
    A flang/test/Lower/HLFIR/c_ptr-constant-init.f90
    A flang/test/Lower/c_ptr-constant-init.f90

  Log Message:
  -----------
  [flang] Fixed initialization of c_ptr/c_funptr arrays.

When lowering ends up outlining the initialization of an entity
containing an array of c_ptr/c_funptr it is treating the array
initializer as scalar due to the missing check for the rank.
When initializing non-0 rank c_ptr/c_funptr entity it has to
recurse via genConstantValue().

Reviewed By: clementval

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




More information about the All-commits mailing list