This is an archive of the discontinued LLVM Phabricator instance.

[flang] BIND(C,NAME=...) corrections
ClosedPublic

Authored by klausler on Mar 1 2023, 12:28 PM.

Details

Summary

The Fortran standard's various restrictions on the use of BIND(C)
often depend more on the presence or absence of an explicit NAME=
specification rather than on its value, but semantics and module
file generation aren't making distinctions between explicit NAME=
specifications that happen to match the default name and declarations
that don't have NAME=. Tweak semantics and module file generation
to conform, and also complain when named BIND(C) attributes are
erroneously applied to entities that can't support them, like
ABSTRACT interfaces.

Diff Detail

Event Timeline

klausler created this revision.Mar 1 2023, 12:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2023, 12:28 PM
klausler requested review of this revision.Mar 1 2023, 12:28 PM
klausler updated this revision to Diff 501633.

Include an omitted update to a test.

vdonaldson accepted this revision.Mar 1 2023, 1:35 PM
This revision is now accepted and ready to land.Mar 1 2023, 1:35 PM
This revision was automatically updated to reflect the committed changes.