This is the mail archive of the
mailing list for the GCC project.
[fortran, patch] PR17741 ICE in gfc_free_namespace, at fortran/symbol.c:2208
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: Fortran List <fortran at gcc dot gnu dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 28 Oct 2006 20:24:30 -0700
- Subject: [fortran, patch] PR17741 ICE in gfc_free_namespace, at fortran/symbol.c:2208
The attached patch is trivial. The refs count in current_ns was not being
bumped up for initial function declarations. So when an error occurs and we
bail out early, we were getting an assert in gfc_free_namespace when the
statement is rejected.
Putting the added line in gfc_match_function_decl () instead also solves the
Regression tested on i686-linux.
OK for 4.3?
2006-10-28 Jerry DeLisle <firstname.lastname@example.org>
* decl.c (get_proc_name): Bump current namespace refs count.
*** decl.c (revision 118121)
--- decl.c (working copy)
*************** get_proc_name (const char *name, gfc_sym
*** 642,647 ****
--- 642,648 ----
rc = gfc_get_symbol (name, gfc_current_ns->parent, result);
sym = *result;
if (sym && !sym->new && gfc_current_state () != COMP_INTERFACE)