[all-commits] [llvm/llvm-project] 09b00a: [flang] Handle dynamic and remotely scoped non-typ...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Mar 27 14:56:54 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 09b00ab4898449aa70c1bc5eb891cfa2addb85fc
      https://github.com/llvm/llvm-project/commit/09b00ab4898449aa70c1bc5eb891cfa2addb85fc
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-03-27 (Mon, 27 Mar 2023)

  Changed paths:
    M flang/include/flang/Runtime/io-api.h
    M flang/include/flang/Semantics/tools.h
    M flang/lib/Semantics/check-declarations.cpp
    M flang/lib/Semantics/tools.cpp
    M flang/runtime/io-api.cpp
    M flang/runtime/type-info.h
    M flang/test/Semantics/generic05.F90
    M flang/test/Semantics/io11.f90

  Log Message:
  -----------
  [flang] Handle dynamic and remotely scoped non-type-bound UDDTIO subroutines

The present I/O infrastructure for user-defined derived type I/O
subroutines works fine for type-bound I/O generic bindings.  It also works
for explicit INTERFACE blocks and GENERIC statements that define
UDDIO subroutines in the same scope as the definition of the derived type,
so long as the specific procedures in those bindings are module procedures
or external procedures.

For non-type-bound UDDTIO specific procedures that are dummy procedures,
thunks of inner procedures, or procedure pointers, or that are defined with
interfaces or GENERIC outside the scope of the definition of the derived
type, a new runtime I/O API is needed so that lowering can generate
a call that supplies the appropriate procedure as well as the defined
type instance.

This patch specifies and implements this new runtime API and provides
utility routines for lowering to use to determine whether it should be
called for any particular OutputItem or InputItem in the parse tree.

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




More information about the All-commits mailing list