This is an archive of the discontinued LLVM Phabricator instance.

[flang] Correct procedure pointer (or dummy) compatibility check
ClosedPublic

Authored by klausler on Jan 27 2023, 9:32 AM.

Details

Summary

Fix a subtle bug in procedure compatibility checking with base
derived types vs. their extensions to ensure that a procedure
expecting an extended type cannot be associated with a pointer
(or dummy procedure) to a procedure expecting a base type.

subroutine s1(base); ... subroutine s2(extended)
procedure(s1), pointer :: p
p => s2 ! <- must be caught as an error

Diff Detail

Event Timeline

klausler created this revision.Jan 27 2023, 9:32 AM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.Jan 27 2023, 9:32 AM
PeteSteinfeld accepted this revision.Jan 27 2023, 10:43 AM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Jan 27 2023, 10:43 AM