On Wed, Nov 20, 2019 at 10:38:30PM +0200, Janne Blomqvist wrote: > On Wed, Nov 20, 2019 at 8:00 PM Bernhard Reutner-Fischer > <rep.dot....@gmail.com> wrote: > > > > On 19 November 2019 23:54:55 CET, Thomas Koenig <tkoe...@netcologne.de> > > wrote: > > >Am 19.11.19 um 11:39 schrieb Bernhard Reutner-Fischer: > > >> + char name[GFC_MAX_SYMBOL_LEN + 1]; > > >> + snprintf (name, GFC_MAX_SYMBOL_LEN, "__dummy_%d_%s", var_num++, > > >> + f->sym->name); > > >> + > > >> + if (gfc_get_sym_tree (name, ns, &symtree, false) != 0) > > >> > > >> (I) you should + sizeof(__dummy__) + 10 for unsigned long %d or the > > >like. > > > > > >GFC_MAX_SYMBOL_LEN is the maximum length of a gfortran symbol. AFAIK, > > > > This is only true for user-provided names in the source code. > > > > Think e.g. class names as can be seen in the dumps.. > > We have GFC_MAX_MANGLED_SYMBOL_LEN for that. *Insert my standard pet > peeve rant that we should use heap allocated unlimited length strings > for these rather than copying stack allocated strings around, or > preferable a symbol table* >
I agree with Janne. This seems like a very good candidate for someone that would like to contribute to gfortran, but does not know where to start. Any lurkers on the mailing list care to give it shot? -- Steve