This is an archive of the discontinued LLVM Phabricator instance.

[flang] Better dummy procedure dummy argument compatibility checking
AbandonedPublic

Authored by klausler on Jul 13 2022, 11:28 AM.

Details

Reviewers
jeanPerier
Summary

When comparing characteristics of dummy arguments to dummy procedures
for compatibility, ignore extent expressions in shapes that are
dummy argument descriptor inquiries -- they will necessarily refer
to distinct dummy argument symbols and return a false incompatibility
result. For example, in:

module m
 contains
  subroutine bar(s)
    interface
       subroutine s(g)
         integer, intent(in) :: g(:)
       end subroutine s
    end interface
  end subroutine bar
  subroutine t(v)
    integer, intent(in) :: v(:)
  end subroutine t
  subroutine foo
    call bar(t)
  end subroutine foo
end module

the actual procedure argument "t" is compatible with the dummy procedure
argument "s" of "bar", because the ranks of t's dummy data object argument
"v" and s's argument "g" match, and their extents are both assumed.

Fixes https://github.com/llvm/llvm-project/issues/55779.

Diff Detail

Event Timeline

klausler created this revision.Jul 13 2022, 11:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2022, 11:28 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Jul 13 2022, 11:28 AM
klausler abandoned this revision.Jul 13 2022, 3:00 PM