[all-commits] [llvm/llvm-project] 67402f: [flang] Do not move finalized function results in ...

jeanPerier via All-commits all-commits at lists.llvm.org
Wed Feb 7 00:19:19 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 67402fe5e4bf7a706d47bc106113f599a8d59947
      https://github.com/llvm/llvm-project/commit/67402fe5e4bf7a706d47bc106113f599a8d59947
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2024-02-07 (Wed, 07 Feb 2024)

  Changed paths:
    M flang/include/flang/Lower/ConvertCall.h
    M flang/include/flang/Optimizer/Builder/MutableBox.h
    M flang/lib/Lower/ConvertCall.cpp
    M flang/lib/Lower/ConvertExpr.cpp
    M flang/lib/Optimizer/Builder/MutableBox.cpp
    M flang/test/Lower/HLFIR/function-return-as-expr.f90

  Log Message:
  -----------
  [flang] Do not move finalized function results in lowering (#80683)

Fortran requires finalizing function results when the result type have
final procedures.

Lowering was unconditionally "moving" function results into values
"hlfir.expr". This is not correct when the results are finalized because
it means the function result storage will be used after the hlfir.expr.

Only move function results that are not finalized.




More information about the All-commits mailing list