2018-05-19 Paul Thomas <pault@gcc.gnu.org>
commit5faffdc8077726f2b814be9d22578fe833e14bda
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 May 2018 10:08:24 +0000 (20 10:08 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 May 2018 10:08:24 +0000 (20 10:08 +0000)
treec3f2c693b3e0fe51513d73a0fd51bb4be92f9c9a
parent23cdcf561c5d1deb350a4ea462bdef8f3742cbe1
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260415 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/resolve.c
gcc/testsuite/gfortran.dg/char_result_18.f90 [new file with mode: 0644]