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
+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
gfc_error_recovery ();
m = gfc_match_eos ();
if (m != MATCH_YES)
- return m;
+ {
+ gfc_error_recovery ();
+ gfc_error_now ("Garbage after PARAMETERIZED TYPE declaration at %C");
+ }
sym->attr.pdt_template = 1;
}
+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
--- /dev/null
+! { 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