Commit 55157d5e by Steven G. Kargl

re PR fortran/85543 (ICE in update_current_proc_array_outer_dependency, at fortran/resolve.c:3060)

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

	PR fortran/85543
	* resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
	pointer dereference.


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

	PR fortran/85543
	* gfortran.dg/pr85543.f90: New test.

From-SVN: r260704
parent afb4d6a8
2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org> 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85543
* resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
pointer dereference.
2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85780 PR fortran/85780
* resolve.c (resolve_fl_procedure): Avoid NULL dereference. * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
......
...@@ -3055,8 +3055,8 @@ update_current_proc_array_outer_dependency (gfc_symbol *sym) ...@@ -3055,8 +3055,8 @@ update_current_proc_array_outer_dependency (gfc_symbol *sym)
/* If SYM has references to outer arrays, so has the procedure calling /* If SYM has references to outer arrays, so has the procedure calling
SYM. If SYM is a procedure pointer, we can assume the worst. */ SYM. If SYM is a procedure pointer, we can assume the worst. */
if (sym->attr.array_outer_dependency if ((sym->attr.array_outer_dependency || sym->attr.proc_pointer)
|| sym->attr.proc_pointer) && gfc_current_ns->proc_name)
gfc_current_ns->proc_name->attr.array_outer_dependency = 1; gfc_current_ns->proc_name->attr.array_outer_dependency = 1;
} }
......
2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org> 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85543
* gfortran.dg/pr85543.f90: New test.
2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85780 PR fortran/85780
* gfortran.dg/pr85780.f90: New test. * gfortran.dg/pr85780.f90: New test.
......
! { dg-do compile }
! PR fortran/85543
program p
procedure(), pointer :: z
contains
real(z()) function f() ! { dg-error "in initialization expression at" }
end
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