This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add one semantic check for procedure bind(C) interface-name
ClosedPublic

Authored by peixin on Jun 6 2022, 8:46 AM.

Details

Summary

As Fortran 2018 C1521, in procedure declaration statement, if
proc-language-binding-spec (bind(c)) is specified, the proc-interface
shall appear, it shall be an interface-name, and interface-name shall
be declared with a proc-language-binding-spec.

Diff Detail

Event Timeline

peixin created this revision.Jun 6 2022, 8:46 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: jdoerfert. · View Herald Transcript
peixin requested review of this revision.Jun 6 2022, 8:46 AM
klausler added inline comments.Jun 6 2022, 12:34 PM
flang/lib/Semantics/check-declarations.cpp
1904

If this is an error, the text should read "must be specified". Use "should" for warnings.

peixin updated this revision to Diff 434665.Jun 6 2022, 6:12 PM
peixin added inline comments.
flang/lib/Semantics/check-declarations.cpp
1904

Thanks. Fixed. Will also pay attention to this for future patch.

jeanPerier accepted this revision.Jun 8 2022, 1:11 AM

LGTM, thanks

This revision is now accepted and ready to land.Jun 8 2022, 1:11 AM