+2013-04-12 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56266
+ * primary.c (gfc_match_varspec): Turn gcc_assert into MATCH_ERROR.
+
2013-04-12 Tobias Burnus <burnus@net-b.de>
PR fortran/56929
return MATCH_ERROR;
gcc_assert (!tail || !tail->next);
- gcc_assert (primary->expr_type == EXPR_VARIABLE
- || (primary->expr_type == EXPR_STRUCTURE
- && primary->symtree && primary->symtree->n.sym
- && primary->symtree->n.sym->attr.flavor));
+
+ if (!(primary->expr_type == EXPR_VARIABLE
+ || (primary->expr_type == EXPR_STRUCTURE
+ && primary->symtree && primary->symtree->n.sym
+ && primary->symtree->n.sym->attr.flavor)))
+ return MATCH_ERROR;
if (tbp->n.tb->is_generic)
tbp_sym = NULL;
+2013-04-12 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56266
+ * gfortran.dg/typebound_proc_28.f03: New.
+
2013-04-12 Jeff Law <law@redhat.com>
* gcc.dg/tree-ssa/vrp87.c: Do not run test on ppc and xtensa
--- /dev/null
+! { dg-do compile }
+!
+! PR 56266: [OOP] ICE on invalid in gfc_match_varspec
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+module t
+
+ implicit none
+
+ type nc
+ contains
+ procedure :: encM => em
+ end type nc
+
+contains
+
+ double precision function em(self)
+ class(nc) :: self
+ em=0.
+ end function
+
+ double precision function cem(c)
+ type(nc) :: c
+ cem=c(i)%encM() ! { dg-error "Unclassifiable statement" }
+ end function
+
+end module
+
+! { dg-final { cleanup-modules "t" } }