Hello Thomas,
looks good to me. Nice catch the missing "break".
Tobias
PS: I think it does not exercise a differ code path, but instead of
derived types, using a character string works as well. The following is
accepted with the unmodified trunk:
character(len=4):: str
print *, str(1)(1:4)
end
On 1/18/20 7:04 PM, Thomas Koenig wrote:
Hello world,
I found an ommission in primary.c which prevented issuing a
more specific error instead of "syntax error" for the case
when a function was declared in an EXTERNAL statement,
and I have now gone for the "Unexpected junk after foo"
variant.
Regression-tested. OK for trunk?
Regards
Thomas
2020-01-18 Thomas König <tkoe...@gcc.gnu.org>
PR fortran/44960
* primary.c (gfc_match_rvalue): Break after setting MATCH_ERROR.
* resolve.c (resolve_function): Issue error when a
function call contains a reference.
2020-01-18 Thomas König <tkoe...@gcc.gnu.org>
PR fortran/44960
* gfortran.dg/function_reference_1.f90: New test.