Hello, Le 10/06/2013 22:40, Tobias Burnus a écrit : > My problem: I do not see where one can best handle the namelist for > modules. One possibility would be gen_namespace_die - but that would > come before the dies of all VAR_DECLs used in the namelist have been > created. And the code seems to assume that the decl is not emitted, > hence, one cannot simply use force_decl_die in gen_namespace_die. - One > possibility would be to add a lookup_decl_die() check (e.g. in > dwarf2out_global_decl) and to use force_decl_die, but I don't know > whether that's a good approach. > > Suggestions? > I'm not at all familiar with the code paths for debug info generation, but wouldn't it work if, starting from the first patch, you moved the call to gfc_traverse_ns (ns, generate_namelist_decl) after this: gfc_traverse_ns (ns, gfc_emit_parameter_debug_info); in the two places where the latter appears?
Is the new tree code the preferred way? A namelist feels too fortran-specific to me to deserve its own middle-end decl code. Mikael