This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix use-associated false-positive error
ClosedPublic

Authored by unterumarmung on May 17 2022, 7:32 AM.

Details

Summary

For the program provided as the test case flang fired the following
error:

error: Semantic errors in main.f90
error: 'foo' is not a procedure

This change fixes the error by postponing handling of UseErrorDetails
from CharacterizeProcedure to a later stage.

Diff Detail

Event Timeline

unterumarmung created this revision.May 17 2022, 7:32 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
unterumarmung requested review of this revision.May 17 2022, 7:32 AM
unterumarmung edited the summary of this revision. (Show Details)May 17 2022, 7:33 AM

Can you add an error test to ensure that if the function foo is called then the Ambiguous error message is preserved?

Added a test case with error & rebased

Hi, @kiranchandramohan! I addressed your review comment, could you please re-review the patch?

LGTM. Please wait a day before submitting in case others have comments or concerns.

flang/test/Semantics/resolve112.f90
2

Nit: Just add a comment about what this test is testing.

This revision is now accepted and ready to land.May 19 2022, 6:57 AM

Added comment to the test and rebased

This revision was automatically updated to reflect the committed changes.