------- Comment #8 from bdavis at gcc dot gnu dot org 2007-02-25 04:42 ------- the below patch looks like it fixes the problem. any chance this could be tryed on the reported problem ?
--bud Index: gcc/gcc/fortran/module.c =================================================================== --- gcc/gcc/fortran/module.c (revision 122310) +++ gcc/gcc/fortran/module.c (working copy) @@ -3598,6 +3598,7 @@ write_common (gfc_symtree *st) { gfc_common_head *p; + pointer_info *pinfo; const char * name; int flags; @@ -3607,6 +3608,14 @@ write_common (st->left); write_common (st->right); + /* only need to write a given symtree entry once for + common blocks */ + p = st->n.common; + pinfo = find_pointer(p); + + if (pinfo != NULL && pinfo->u.wsym.state != UNREFERENCED) + return; + mio_lparen (); /* Write the unmangled name. */ @@ -3614,7 +3623,6 @@ mio_pool_string (&name); - p = st->n.common; mio_symbol_ref (&p->head); flags = p->saved ? 1 : 0; if (p->threadprivate) flags |= 2; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30285