This is an archive of the discontinued LLVM Phabricator instance.

[flang] Improve message for assignment to subprogram
ClosedPublic

Authored by tskeith on Aug 6 2020, 3:47 PM.

Details

Summary

In the example below we were producing the error message
"Assignment to constant 'f' is not allowed":

function f() result(r)
  f = 1.0
end

This changes it to a more helpful message when the LHS is a subprogram
name and also mentions the function result name when it's a function.

Diff Detail

Event Timeline

tskeith created this revision.Aug 6 2020, 3:47 PM
Herald added a project: Restricted Project. · View Herald Transcript
tskeith requested review of this revision.Aug 6 2020, 3:47 PM
sscalpone accepted this revision.Aug 6 2020, 6:50 PM
This revision is now accepted and ready to land.Aug 6 2020, 6:50 PM
This revision was landed with ongoing or failed builds.Aug 6 2020, 8:34 PM
This revision was automatically updated to reflect the committed changes.