------- Comment #4 from burnus at gcc dot gnu dot org 2010-07-28 13:14 -------
(In reply to comment #3)
> Minimal test case, compile with:
> gfortran --param ggc-min-expand=0 --param ggc-min-heapsize=0
The problems seems to be that one tries to free the NEXT twice - once for the
symbol in VALUE and once as global procedure; this can be seen by the value
0xa5a5a5a5a5a5a5a5 in the dump - and by looking at the place where it crashes,
namely: gt_ggc_mx_function; the cleanup is done for the module, i.e.
gt_ggc_m_P17module_htab_entry4htab.
[Actually, it could also be that one frees "VALUE" twice - I have not verified
that it is NEXT.]
I thought something like the following would help - but it does _not_:
--- trans-decl.c (revision 162619)
+++ trans-decl.c (working copy)
@@ -3409,6 +3409,9 @@ gfc_create_module_variable (gfc_symbol *
if (sym->attr.entry)
return;
+ if (sym->attr.if_source != IFSRC_DECL)
+ return;
+
/* Make sure we convert the types of the derived types from iso_c_binding
into (void *). */
if (sym->attr.flavor != FL_PROCEDURE && sym->attr.is_iso_c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45087