On Tue, Dec 11, 2012 at 09:16:53PM -0500, David Edelsohn wrote: > > @@ -1090,7 +1090,15 @@ gfc_create_string_length (gfc_symbol * s > > const char *name; > > > > /* Also prefix the mangled name. */ > > - if (sym->module) > > + if (sym->attr.save || sym->ns->proc_name->attr.flavor == FL_MODULE) > > + { > > + if (sym->module) > > + name = gfc_get_string (GFC_PREFIX ("%s_MOD_%s"), sym->module, > > + sym->name); > > + else > > + name = gfc_get_string (GFC_PREFIX ("%s"), sym->name); > > + } > > + else if (sym->module) > > name = gfc_get_string (".__%s_MOD_%s", sym->module, sym->name); > > else > > name = gfc_get_string (".%s", sym->name); > > Why are you only correcting the prefix for attr.save or FL_MODULE? > Why leave the dot name in the other cases?
Because otherwise it is just an automatic variable, i.e. doesn't make it into assembly in any way appart from possibly debug info DW_AT_name (where it is desirable to have shorter names). It could have similarly just name = NULL for those (just would make dumps slightly less readable). Jakub