aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2010-10-07 10:46:58 +0000
committerMikael Morin <mikael@gcc.gnu.org>2010-10-07 10:46:58 +0000
commit9f23af489a0c86f0b2f98db15d0e5761ed72dacd (patch)
treeddd20f0785bae84cf67811bd9c809fadb41e9baf /gcc/fortran/decl.c
parentfa8d6f0771c5454f35a4ca2bec88313bc28c0914 (diff)
downloadgcc-9f23af489a0c86f0b2f98db15d0e5761ed72dacd.zip
gcc-9f23af489a0c86f0b2f98db15d0e5761ed72dacd.tar.gz
gcc-9f23af489a0c86f0b2f98db15d0e5761ed72dacd.tar.bz2
re PR fortran/45916 (ICE in match_procedure_in_type, at fortran/decl.c:7921)
2010-10-07 Mikael Morin <mikael@gcc.gnu.org> PR fortran/45916 Revert revision 165026: 2010-10-06 Mikael Morin <mikael@gcc.gnu.org> * decl.c (match_procedure_in_type): Assertify if conditions. 2010-10-07 Mikael Morin <mikael@gcc.gnu.org> PR fortran/45916 * gfortran.dg/generic_typebound_operator_1.f90: New test. From-SVN: r165089
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 3b01d39..5b4ab18 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -7916,9 +7916,8 @@ 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)
+ if (stree && stree->n.tb)
{
- 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;
@@ -7926,9 +7925,11 @@ match_procedure_in_type (void)
/* Insert it and set attributes. */
- gcc_assert (!stree);
- stree = gfc_new_symtree (&ns->tb_sym_root, name);
- gcc_assert (stree);
+ if (!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,