[PATCH] Fix PR debug/26754

Eric Botcazou ebotcazou@adacore.com
Mon Jun 12 19:11:00 GMT 2006


> Debug info generated by the 4.x series of compilers are wrong for variables
> accessed from nested functions:

Attached is a revised version that avoids duplicating any code.

Regtested on i586-suse-linux.  OK for mainline?


2006-06-12  Eric Botcazou  <ebotcazou@adacore.com>

        PR debug/26754
        * gimplify.c (declare_tmp_vars): Rename into declare_vars.
	Add debug_info parameter.  Chain the vars to the BLOCK instead
	of the BIND_EXPR if debug info are requested for them.
	(pop_gimplify_context): Adjust for above change.
	(gimple_add_tmp_var): Likewise.
        * tree-gimple.h (declare_tmp_vars): Rename into declare_vars.
	Add bool parameter.
        * tree-nested.c (convert_nonlocal_reference): Adjust for above change.
	(convert_local_reference): Likewise.
	(get_local_debug_decl): Set DECL_IGNORED_P on the original variable.
        (finalize_nesting_tree_1): Request that debug info be emitted
	for debug_var_chain.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: f318-004-3.diff
Type: text/x-diff
Size: 4768 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060612/57964b9e/attachment.bin>


More information about the Gcc-patches mailing list