[PATCH] Further debuginfo fixes for VLAs and nested functions
Jakub Jelinek
jakub@redhat.com
Thu Apr 23 18:51:00 GMT 2009
On Wed, Apr 22, 2009 at 05:26:03PM +0200, Eric Botcazou wrote:
> > 4) Ada doesn't at least in some cases seem to create outermost BIND_EXPR
> > for functions which references DECL_INITIAL (fndecl) block, so when
> > finalize_nesting_tree_1 calls declare_vars on debug_var_chain (vars
> > that are really never mentioned in the stmts and are only needed for
> > debug info), the variables are recorded just into gimple_bind_vars
> > (and afterwards moved to cfun->local_decls and then dropped as unused),
> > but not into any BLOCK_VARS where it would be actually emitted into
> > debug info.
>
> Yes, known quirk, I tried to fix it in the gimplifier at some point but this
> was rejected: http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01080.html
>
> What do you think? Not that I cannot try and fix it in gigi but the problems
> you have described with the gimplifier-created GIMPLE_BIND would stay latent.
If the FE creates the BIND_EXPR, then the gimplifier won't need to add it.
Anyway, the patch I posted cures this issue in tree-nested.c by adding
directly to DECL_INITIAL's BLOCK_VARS, the debug_var_chain vars don't need
to be in local_decls, they are for debug info purposes only.
Jakub
More information about the Gcc-patches
mailing list