public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Jambor <mjambor@suse.cz>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix segfault with -fdump-tree-all-all
Date: Fri, 21 Mar 2008 13:06:00 -0000	[thread overview]
Message-ID: <20080321114511.GA1255@virgil.suse.cz> (raw)
In-Reply-To: <20080319181811.GA32756@virgil.suse.cz>

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)

  reply	other threads:[~2008-03-21 11:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-19 15:45 Martin Jambor
2008-03-19 19:46 ` Richard Guenther
2008-03-19 20:54   ` Martin Jambor
2008-03-21 13:06     ` Martin Jambor [this message]
2008-03-21 13:11       ` Richard Guenther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080321114511.GA1255@virgil.suse.cz \
    --to=mjambor@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).