This is an archive of the discontinued LLVM Phabricator instance.

[flang] Always incorporate parent types' special generic bindings
ClosedPublic

Authored by klausler on Feb 15 2023, 5:01 PM.

Details

Summary

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)".

Diff Detail

Event Timeline

klausler created this revision.Feb 15 2023, 5:01 PM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.Feb 15 2023, 5:01 PM
This revision is now accepted and ready to land.Feb 16 2023, 12:42 AM