This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Debug/Fortran] PR37132 - RFC/RFA - support DW_TAG_namelist
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Wed, 12 Jun 2013 23:31:30 +0200
- Subject: Re: [Debug/Fortran] PR37132 - RFC/RFA - support DW_TAG_namelist
- References: <51B639AE dot 1000305 at net-b dot de>
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