Commit 3495c782 authored by Tim Keith's avatar Tim Keith
Browse files

[flang] Improve array element errors

When something is parsed as an array element it was sometimes intended
to be a function call or structure constructor. So if the base name is
not found the errors can be confusing. This is an attempt to improve
them.

When the subscript list is empty, it was probably meant to be a function
call, so report that the name is not a function.

If the base is a scalar but there are subscripts, report that it is not
an array.

Original-commit: flang-compiler/f18@e2fd5333ff1bb1e8e88cbf35028654bcf70fe9e9
Reviewed-on: https://github.com/flang-compiler/f18/pull/1039
parent 4ffbdb3d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment