Page MenuHomePhabricator

[flang] Improve error messages for procedures in expressions

Authored by tskeith on Aug 17 2020, 2:14 PM.



When a procedure name was used on the RHS of an assignment we were not
reporting the error. When one was used in an expression the error
message wasn't very good (e.g. "Operands of + must be numeric; have
INTEGER(4) and untyped").

Detect these cases in ArgumentAnalyzer and emit better messages,
depending on whether the named procedure is a function or subroutine.

Procedure names may appear as actual arguments to function and
subroutine calls so don't report errors in those cases. That is the same
case where assumed type arguments are allowed, so rename isAssumedType_
to isProcedureCall_ and use that to decide if it is an error.

Diff Detail

Event Timeline

tskeith created this revision.Aug 17 2020, 2:14 PM
Herald added a project: Restricted Project. · View Herald Transcript
tskeith requested review of this revision.Aug 17 2020, 2:14 PM
PeteSteinfeld accepted this revision.Aug 17 2020, 2:30 PM

All builds, tests, and looks good.

This revision is now accepted and ready to land.Aug 17 2020, 2:30 PM
sscalpone accepted this revision.Aug 17 2020, 2:52 PM