Page MenuHomePhabricator

[flang] Tighten rules to resolve procedure as intrinsic procedure

Authored by jeanPerier on Oct 23 2020, 8:37 AM.



2 Bug fixes:

  • Do not resolve procedure as intrinsic if they appeared in an EXTERNAL attribute statement (one path was not considering this flag)
  • Emit an error if a procedure resolved to be an intrinsic function (resp. subroutine) is used as a subroutine (resp. function). Lowering was attempted while the evaluate::Expression for the call was missing without any errors.

1 behavior change:

  • Do not implicitly resolve subroutines (resp. functions) as intrinsics because their name is the name of an intrinsic function (resp. subroutine). Add justification in documentation.

Diff Detail

Event Timeline

jeanPerier created this revision.Oct 23 2020, 8:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 23 2020, 8:37 AM
jeanPerier requested review of this revision.Oct 23 2020, 8:37 AM
tskeith accepted this revision.Oct 23 2020, 9:21 AM
tskeith added inline comments.

Typo: Symbol -> Subroutine

This revision is now accepted and ready to land.Oct 23 2020, 9:21 AM
klausler accepted this revision.Oct 23 2020, 10:41 AM

Looks great to me; thanks!


English: "f18 will always consider this case to be the intrinsic..."


sp. "rationale".


"procedure" should be singular


"resolve" or "prevent" or "forestall", not "raise"

Thanks for the reviews. Fix typos in documentation an error message.

jeanPerier marked 5 inline comments as done.Oct 26 2020, 3:23 AM
This revision was landed with ongoing or failed builds.Oct 26 2020, 3:27 AM
This revision was automatically updated to reflect the committed changes.