[all-commits] [llvm/llvm-project] 24e8cf: [flang] Capture result interface of functions call...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Wed Jun 22 13:33:08 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 24e8cf45a3c7175659afb1c2654672856aea9800
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2022-06-22 (Wed, 22 Jun 2022)

  Changed paths:
    M flang/lib/Lower/PFTBuilder.cpp
    A flang/test/Lower/host-associated-functions.f90

  Log Message:
  [flang] Capture result interface of functions called in internal procedures

Character and array results are allocated on the caller side. This
require evaluating the result interface on the call site. When calling
such functions inside an internal procedure, it is possible that the
interface is defined in the host, in which case the lengths/bounds of
the function results must be captured so that they are available in
the internal function to emit the call.

To handle this case, extend the PFT symbol visit to visit the bounds and length
parameters of functions called in the internal procedure parse tree.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: klausler

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

Co-authored-by: Jean Perier <jperier at nvidia.com>

More information about the All-commits mailing list