[all-commits] [llvm/llvm-project] 8eee23: [flang] Lower sequence associated argument passed ...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue Mar 19 03:26:58 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8eee236021f72821d628ec31d8e8d1f92e7821d3
      https://github.com/llvm/llvm-project/commit/8eee236021f72821d628ec31d8e8d1f92e7821d3
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M flang/include/flang/Evaluate/characteristics.h
    M flang/include/flang/Lower/CallInterface.h
    M flang/include/flang/Lower/ConvertVariable.h
    M flang/lib/Lower/CallInterface.cpp
    M flang/lib/Lower/ConvertCall.cpp
    M flang/lib/Lower/ConvertVariable.cpp
    A flang/test/Lower/HLFIR/call-sequence-associated-descriptors.f90

  Log Message:
  -----------
  [flang] Lower sequence associated argument passed by descriptor (#85696)

The current lowering did not handle sequence associated argument passed
by descriptor. This case is special because sequence association implies
that the actual and dummy argument need to to agree in rank and shape.
Usually, arguments that can be sequence associated are passed by raw
address, and the shape mistmatch is transparent. But there are three
cases of explicit and assumed-size arrays passed by descriptors:
 - polymorphic arguments
 - BIND(C) assumed-length arguments (F'2023 18.3.7 (5)).
 - length parametrized derived types (TBD)

The callee side is expecting a descriptor containing the dummy rank and
shape. This was not the case. This patch fix that by evaluating the
dummy shape on the caller side using the interface (that has to be
available when arguments are passed by descriptors).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list