diff options
author | Janus Weil <janus@gcc.gnu.org> | 2013-04-12 23:41:50 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2013-04-12 23:41:50 +0200 |
commit | 236e3815280b1c6f0809f956c5f43c005118d6a0 (patch) | |
tree | fcb1fe9ca2fbe4df04d96f9608f1f74caaf2c9a3 /gcc/fortran | |
parent | 701de10f52e5182a2f3a0603a591b17a53f8a27a (diff) | |
download | gcc-236e3815280b1c6f0809f956c5f43c005118d6a0.zip gcc-236e3815280b1c6f0809f956c5f43c005118d6a0.tar.gz gcc-236e3815280b1c6f0809f956c5f43c005118d6a0.tar.bz2 |
re PR fortran/56266 ([OOP] ICE on invalid in gfc_match_varspec)
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.
From-SVN: r197936
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/primary.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c2b8a5d..ace16ad 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index cd8a417..1276abb 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; |