This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54223] Statement function statement with dummy arguments that are also OPTIONAL may crash in wrong calls
- From: "kargl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Feb 2018 18:26:12 +0000
- Subject: [Bug fortran/54223] Statement function statement with dummy arguments that are also OPTIONAL may crash in wrong calls
- Auto-submitted: auto-generated
- References: <bug-54223-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54223
--- Comment #7 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Mon Feb 12 18:25:41 2018
New Revision: 257596
URL: https://gcc.gnu.org/viewcvs?rev=257596&root=gcc&view=rev
Log:
2018-02-12 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-12 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.
Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/statement_function_1.f90
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/statement_function_2.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/interface.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog