re PR fortran/80657 (Loop in character function declaration)
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 20 May 2018 10:08:24 +0000 (10:08 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 20 May 2018 10:08:24 +0000 (10:08 +0000)
commit9ad8aaf839866994905bf577bcf2a1dee1b8a01a
treec3f2c693b3e0fe51513d73a0fd51bb4be92f9c9a
parentf82f425b56a1ccf1950c6d0992e7c106558acba0
re PR fortran/80657 (Loop in character function declaration)

2018-05-19  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/80657
* resolve.c (flag_fn_result_spec): Use the 'sym' argument to
test for self refs to the function result in the character len
expression. If a self reference is found, emit an error and
return true.
(resolve_fntype): Use the function symbol in the calls to the
above.

2018-05-19  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/80657
* gfortran.dg/char_result_18.f90: New test.

From-SVN: r260415
gcc/fortran/resolve.c
gcc/testsuite/gfortran.dg/char_result_18.f90 [new file with mode: 0644]