This is the mail archive of the gcc-patches@gcc.gnu.org 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] Avoid SRA-created debug binds with uninitialized RHSs


On Wed, Feb 27, 2013 at 04:08:09PM +0100, Martin Jambor wrote:
> 2013-02-26  Martin Jambor  <mjambor@suse.cz>
> 
> 	* tree-sra.c (load_assign_lhs_subreplacements): Do not put replacements
> 	with no initialization to the RHS of debug statements.

Okay.

> --- src.orig/gcc/tree-sra.c
> +++ src/gcc/tree-sra.c
> @@ -2870,7 +2870,12 @@ load_assign_lhs_subreplacements (struct
>  							    lacc->size);
>  
>  	      if (racc && racc->grp_to_be_replaced)
> -		drhs = get_access_replacement (racc);
> +		{
> +		  if (racc->grp_write)
> +		    drhs = get_access_replacement (racc);
> +		  else
> +		    drhs = NULL;
> +		}
>  	      else if (*refreshed == SRA_UDH_LEFT)
>  		drhs = build_debug_ref_for_model (loc, lacc->base, lacc->offset,
>  						  lacc);

	Jakub


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