This is an archive of the discontinued LLVM Phabricator instance.

[flang] Inner INTRINSIC must not shadow host generic
ClosedPublic

Authored by klausler on Apr 13 2022, 12:51 PM.

Details

Summary

A generic interface (however spelled) can have the same name as
an intrinsic procedure in the same scope. When an explicit INTRINSIC
attribute statement appears in a nested scope, semantics was
unconditionally declaring a new symbol that hid the generic entirely.
Catch this case and create instead a host association symbol for
the generic that can then be decorated with the INTRINSIC attribute.

Diff Detail

Event Timeline

klausler created this revision.Apr 13 2022, 12:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 12:51 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Apr 13 2022, 12:51 PM
jeanPerier accepted this revision.Apr 14 2022, 5:39 AM

Clang-format is unhappy in resolve-names.cpp, otherwise LGTM.

This revision is now accepted and ready to land.Apr 14 2022, 5:39 AM
klausler updated this revision to Diff 422967.Apr 14 2022, 2:57 PM

Reformat changed code again with clang-format.

This revision was automatically updated to reflect the committed changes.