[all-commits] [llvm/llvm-project] d87135: [flang] Improve message for assignment to subprogram

Tim Keith via All-commits all-commits at lists.llvm.org
Thu Aug 6 20:34:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d8713523a2f5847ca69c8ef172578a915c129fe8
      https://github.com/llvm/llvm-project/commit/d8713523a2f5847ca69c8ef172578a915c129fe8
  Author: Tim Keith <tkeith at nvidia.com>
  Date:   2020-08-06 (Thu, 06 Aug 2020)

  Changed paths:
    M flang/lib/Semantics/expression.cpp
    M flang/test/Semantics/assign04.f90

  Log Message:
  -----------
  [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




More information about the All-commits mailing list