On Fri, Oct 26, 2012 at 11:22:54AM +0200, Martin Jambor wrote: > the following patch fixes PR 54971 by creating extra > for-debug-statements-only declarations for parts of aggregates that > are never read and then creates debug bind statements so that the > value of the non-used part is accessible from debug info. > > Bootstrapped and tested on x86_64-linux without any problems, OK for > trunk?
Ok, thanks. I'll as a follow up add a testcase. > 2012-10-25 Martin Jambor <mjam...@suse.cz> > > PR debug/54971 > * tree-sra.c (struct access): New flag grp_to_be_debug_replaced. > (dump_access): Dump the new flag. > (analyze_access_subtree): Set the new flag when appropriate. > (build_debug_ref_for_model): New function. > (create_access_replacement): Handle debug replacements differently. > (generate_subtree_copies): Handle the grp_to_be_debug_replaced flag. > (init_subtree_with_zero): Likewise. > (sra_modify_expr): Likewise. > (load_assign_lhs_subreplacements): Likewise. > (sra_modify_assign): Likewise. Jakub