diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-12 21:41:50 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-12 21:41:50 +0000 |
commit | 15fb628eaedba2c5c564859698202ddcbd9db1e6 (patch) | |
tree | fcb1fe9ca2fbe4df04d96f9608f1f74caaf2c9a3 /gcc/fortran/primary.c | |
parent | 6db72e1749a8161d1ffcc3589441f0ccaa385b89 (diff) | |
download | gcc-15fb628eaedba2c5c564859698202ddcbd9db1e6.tar.gz |
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 Janus Weil <janus@gcc.gnu.org>
PR fortran/56266
* gfortran.dg/typebound_proc_28.f03: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197936 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index cd8a4175594..1276abb3aa7 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -1953,10 +1953,12 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag, 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; |