This is an archive of the discontinued LLVM Phabricator instance.

[flang] Accept a separate module procedure interface as a specific procedure
ClosedPublic

Authored by klausler on Sep 21 2022, 5:31 PM.

Details

Summary

The code snippet

module m
  interface
    module subroutine specific
    end subroutine
  end interface
  interface generic
     module procedure specific
  end interface
end module

elicits a bogus semantic error about "specific" not being an acceptable
module procedure for the generic interface; fix.

Diff Detail

Event Timeline

klausler created this revision.Sep 21 2022, 5:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2022, 5:31 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Sep 21 2022, 5:31 PM
PeteSteinfeld requested changes to this revision.Sep 22 2022, 7:01 AM

All builds and tests correctly and fixes the specified problem. But we should have a test for the new error message.

flang/lib/Semantics/check-declarations.cpp
1201

It would be good to have a test that produces this message.

This revision now requires changes to proceed.Sep 22 2022, 7:01 AM
klausler updated this revision to Diff 462242.Sep 22 2022, 10:57 AM

Add test for error message.

PeteSteinfeld accepted this revision.Sep 22 2022, 11:33 AM

Thanks, Peter. All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Sep 22 2022, 11:33 AM