Commit d5c50b02 by Janus Weil

re PR fortran/78593 (ICE in gfc_match_varspec, at fortran/primary.c:2053)

2016-11-30  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/78593
	* primary.c (gfc_match_varspec): Check if sym is non-null to avoid ICE.

2016-11-30  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/78593
	* gfortran.dg/derived_result.f90: New test case.

From-SVN: r243020
parent 4b498f72
2016-11-30 Janus Weil <janus@gcc.gnu.org> 2016-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/78593
* primary.c (gfc_match_varspec): Check if sym is non-null to avoid ICE.
2016-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/78592 PR fortran/78592
* interface.c (gfc_find_specific_dtio_proc): Rearrange code to avoid * interface.c (gfc_find_specific_dtio_proc): Rearrange code to avoid
dereferencing a null pointer. dereferencing a null pointer.
......
...@@ -2050,7 +2050,7 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag, ...@@ -2050,7 +2050,7 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag,
if (m != MATCH_YES) if (m != MATCH_YES)
return MATCH_ERROR; return MATCH_ERROR;
if (sym->f2k_derived) if (sym && sym->f2k_derived)
tbp = gfc_find_typebound_proc (sym, &t, name, false, &gfc_current_locus); tbp = gfc_find_typebound_proc (sym, &t, name, false, &gfc_current_locus);
else else
tbp = NULL; tbp = NULL;
......
2016-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/78593
* gfortran.dg/derived_result.f90: New test case.
2016-11-30 Thomas Preud'homme <thomas.preudhomme@arm.com> 2016-11-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
* lib/target-supports.exp (add_options_for_arm_arch_v6m): Add * lib/target-supports.exp (add_options_for_arm_arch_v6m): Add
......
! { dg-do compile }
!
! PR 78593: [6/7 Regression] ICE in gfc_match_varspec, at fortran/primary.c:2053
!
! Contributed by Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de>
type(t) function add (x, y) ! { dg-error "is not accessible" }
integer, intent(in) :: x, y
add%a = x + y ! { dg-error "Unclassifiable statement" }
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