HomePhabricator

[flang] Improve message for assignment to subprogram

Authored by tskeith on Aug 6 2020, 8:33 PM.

Description

[flang] Improve message for assignment to subprogram

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.

Differential Revision: https://reviews.llvm.org/D85483