From: Mikael Morin Date: Wed, 6 Oct 2010 14:11:30 +0000 (+0000) Subject: decl.c (match_procedure_in_type): Assertify if conditions. X-Git-Tag: upstream/12.2.0~89708 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9ab240e0c7223cf61c8a586be9204faea04970c;p=platform%2Fupstream%2Fgcc.git decl.c (match_procedure_in_type): Assertify if conditions. 2010-10-06 Mikael Morin * decl.c (match_procedure_in_type): Assertify if conditions. From-SVN: r165026 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index e690c57..12b6c38 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,9 @@ 2010-10-06 Mikael Morin + * decl.c (match_procedure_in_type): Assertify if conditions. + +2010-10-06 Mikael Morin + * cpp.c (gfc_cpp_post_options): Don't create a cpp reader if preprocessing is disabled. diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 5b4ab18..3b01d39 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -7916,8 +7916,9 @@ match_procedure_in_type (void) would be an error. If a GENERIC already targetted this binding, it may be already there but then typebound is still NULL. */ stree = gfc_find_symtree (ns->tb_sym_root, name); - if (stree && stree->n.tb) + if (stree) { + gcc_assert (stree->n.tb); gfc_error ("There is already a procedure with binding name '%s' for " "the derived type '%s' at %C", name, block->name); return MATCH_ERROR; @@ -7925,11 +7926,9 @@ match_procedure_in_type (void) /* Insert it and set attributes. */ - if (!stree) - { - stree = gfc_new_symtree (&ns->tb_sym_root, name); - gcc_assert (stree); - } + gcc_assert (!stree); + stree = gfc_new_symtree (&ns->tb_sym_root, name); + gcc_assert (stree); stree->n.tb = gfc_get_typebound_proc (&tb); if (gfc_get_sym_tree (target, gfc_current_ns, &stree->n.tb->u.specific,