re PR fortran/54223 (Statement function statement with dummy arguments that are also...
authorSteven G. Kargl <kargl@gcc.gnu.org>
Sun, 11 Feb 2018 18:44:05 +0000 (18:44 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Sun, 11 Feb 2018 18:44:05 +0000 (18:44 +0000)
commitf3883269c3dd4528cb089c640edb35029b1398a0
treeb65b027b9db3990712080a76dafddb627b91f43b
parente519d2e8199746e9d2b6ef70de55f7331df5bc47
re PR fortran/54223 (Statement function statement with dummy arguments that are also OPTIONAL may crash in wrong calls)

2018-02-11  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/54223
PR fortran/84276
* interface.c (compare_actual_formal): Add in_statement_function
bool parameter.  Skip check of INTENT attribute for statement
functions.  Arguments to a statement function cannot be optional,
issue error for missing argument.
(gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
in_statement_function.

2018-02-11  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/54223
PR fortran/84276
* gfortran.dg/statement_function_1.f90: New test.
* gfortran.dg/statement_function_2.f90: New test.

From-SVN: r257565
gcc/fortran/ChangeLog
gcc/fortran/interface.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/statement_function_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/statement_function_2.f90 [new file with mode: 0644]