Commit f59986b2 by Paul Thomas

re PR fortran/83866 (ICE in gfc_release_symbol, at fortran/symbol.c:3087)

2018-23-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/83866
	* decl.c (gfc_match_derived_decl): If eos not matched, recover
	and emit error about garbage after declaration.

2018-23-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/83866
	* gfortran.dg/pdt_29.f03 : New test.

From-SVN: r256995
parent 84ee745e
2018-23-01 Paul Thomas <pault@gcc.gnu.org> 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83866
* decl.c (gfc_match_derived_decl): If eos not matched, recover
and emit error about garbage after declaration.
2018-23-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83898 PR fortran/83898
* trans-stmt.c (trans_associate_var): Do not set cst_array_ctor * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
for characters. for characters.
......
...@@ -9857,7 +9857,10 @@ gfc_match_derived_decl (void) ...@@ -9857,7 +9857,10 @@ gfc_match_derived_decl (void)
gfc_error_recovery (); gfc_error_recovery ();
m = gfc_match_eos (); m = gfc_match_eos ();
if (m != MATCH_YES) if (m != MATCH_YES)
return m; {
gfc_error_recovery ();
gfc_error_now ("Garbage after PARAMETERIZED TYPE declaration at %C");
}
sym->attr.pdt_template = 1; sym->attr.pdt_template = 1;
} }
......
2018-23-01 Paul Thomas <pault@gcc.gnu.org> 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83866
* gfortran.dg/pdt_29.f03 : New test.
2018-23-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83898 PR fortran/83898
* gfortran.dg/associate_33.f03 : New test. * gfortran.dg/associate_33.f03 : New test.
......
! { dg-do compile }
!
! Test the fix for PR83866.f90
!
! Contributed by G Steinmetz <gscfq@t-online.de>
!
program p
type private
end type
type t
class(t), pointer :: a
end type
type extends(t) :: t2 ! { dg-error "Garbage after | does not have a component" }
end type
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