Commit 67b8d50c by Steven G. Kargl

re PR fortran/85780 (ICE in resolve_fl_procedure, at fortran/resolve.c:12504)

2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/85780
	* resolve.c (resolve_fl_procedure): Avoid NULL dereference.

2018-05-24  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/85780
	* gfortran.dg/pr85780.f90: New test.

From-SVN: r260698
parent 1072bff8
2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org> 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85780
* resolve.c (resolve_fl_procedure): Avoid NULL dereference.
2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85779 PR fortran/85779
* decl.c (gfc_match_derived_decl): Fix NULL point dereference. * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
......
...@@ -12503,7 +12503,7 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag) ...@@ -12503,7 +12503,7 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
while (curr_arg != NULL) while (curr_arg != NULL)
{ {
/* Skip implicitly typed dummy args here. */ /* Skip implicitly typed dummy args here. */
if (curr_arg->sym->attr.implicit_type == 0) if (curr_arg->sym && curr_arg->sym->attr.implicit_type == 0)
if (!gfc_verify_c_interop_param (curr_arg->sym)) if (!gfc_verify_c_interop_param (curr_arg->sym))
/* If something is found to fail, record the fact so we /* If something is found to fail, record the fact so we
can mark the symbol for the procedure as not being can mark the symbol for the procedure as not being
......
2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org> 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85780
* gfortran.dg/pr85780.f90: New test.
2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85779 PR fortran/85779
* gfortran.dg/pr85779_1.f90: New test. * gfortran.dg/pr85779_1.f90: New test.
* gfortran.dg/pr85779_2.f90: Ditto. * gfortran.dg/pr85779_2.f90: Ditto.
......
! { dg-do compile }
! { dg-options "-std=legacy" }
! PR fortran/85780
subroutine s(*) bind(c)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment