This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Further debuginfo fixes for VLAs and nested functions

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:
> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]