The attached patch fixes an accepts-invalid while enforcing C1560 (R1530) If RESULT appears, the function-name shall not appear in any specification statement in the scoping unit of the function subprogram. Regression tested on x86_64-*-freebsd. OK to commit? 2018-03-19 Steven G. Kargl PR fortran/42651 * decl.c (check_function_name): Improved error message (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name. 2018-03-19 Steven G. Kargl PR fortran/42651 * gfortran.dg/pr42651.f90: New test. * gfortran.df/func_result_7.f90: Update for new error message. -- Steve