[all-commits] [llvm/llvm-project] 7ed26a: [flang] Always incorporate parent types' special g...

Peter Klausler via All-commits all-commits at lists.llvm.org
Thu Feb 16 08:30:41 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ed26ad10cef4d8c115a30d59352981efe7765b5
      https://github.com/llvm/llvm-project/commit/7ed26ad10cef4d8c115a30d59352981efe7765b5
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-02-16 (Thu, 16 Feb 2023)

  Changed paths:
    M flang/lib/Semantics/runtime-type-info.cpp
    M flang/module/__fortran_type_info.f90
    M flang/runtime/type-info.h
    A flang/test/Semantics/typeinfo02.f90

  Log Message:
  -----------
  [flang] Always incorporate parent types' special generic bindings

The runtime type information table generator was broken when dealing
with an extension derived type that didn't include a special generic
procedure binding for ASSIGNMENT(=) or user-defined I/O, but one of
whose ancestor types did.  Ensure that the runtime derived type info
tables have complete subtables for all of these special bindings,
and respect any overrides that may have been defined.

Motivating example:
  type parent
   contains
    procedure :: dtWrite => dtWrite1
    generic :: write(formatted) => dtWrite
  end type
  type, extends(parent) :: extended
   contains
    procedure :: dtWrite => dtWrite2
  end type

The runtime derived type information table for "extended" must include
a special generic procedure entry for "write(formatted)" that points
to "dtWrite2" even though "extend" has no generic procedure for
"write(formatted)".

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




More information about the All-commits mailing list