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] Fix segfault with -fdump-tree-all-all


The patch below passed bootstrap and testsuite with no new regressions
on  linux-i386.  I  did not  bootstrap ADA  though (so  that  the test
finished overnight) but I hope that  does not matter with such a small
change in debug dumping code.

OK, to commit?

Thanks,

Martin

On Wed, Mar 19, 2008 at 07:18:11PM +0100, Martin Jambor wrote:
> Changelog:
> 
> 2008-03-19  Martin Jambor  <mjambor@suse.cz>
> 
>        * tree-data-ref.c (dump_data_dependence_relation): Avoid data
>        reference dumps if ddr is NULL or dependence is unknown.
> 
> Patch:
> 
> Index: gcc/tree-data-ref.c
> ===================================================================
> --- gcc/tree-data-ref.c	(revision 133342)
> +++ gcc/tree-data-ref.c	(working copy)
> @@ -358,17 +358,20 @@ dump_data_dependence_relation (FILE *out
>  {
>    struct data_reference *dra, *drb;
>  
> -  dra = DDR_A (ddr);
> -  drb = DDR_B (ddr);
>    fprintf (outf, "(Data Dep: \n");
>  
> +  if (!ddr || DDR_ARE_DEPENDENT (ddr) == chrec_dont_know)
> +    {
> +      fprintf (outf, "    (don't know)\n)\n");
> +      return;
> +    }
> +
> +  dra = DDR_A (ddr);
> +  drb = DDR_B (ddr);
>    dump_data_reference (outf, dra);
>    dump_data_reference (outf, drb);
>  
> -  if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know)
> -    fprintf (outf, "    (don't know)\n");
> -  
> -  else if (DDR_ARE_DEPENDENT (ddr) == chrec_known)
> +  if (DDR_ARE_DEPENDENT (ddr) == chrec_known)
>      fprintf (outf, "    (no dependence)\n");
>    
>    else if (DDR_ARE_DEPENDENT (ddr) == NULL_TREE)


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