From ed2024ba8fa6cd36141caae1db4f56e570177123 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Fri, 21 Mar 2008 13:42:56 +0100 Subject: [PATCH] tree-data-ref.c (dump_data_dependence_relation): Avoid data reference dumps if ddr is NULL or dependence is unknown. 2008-03-21 Martin Jambor * tree-data-ref.c (dump_data_dependence_relation): Avoid data reference dumps if ddr is NULL or dependence is unknown. From-SVN: r133419 --- gcc/ChangeLog | 5 +++++ gcc/tree-data-ref.c | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c316af343f6..2f4c0768ef1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-03-21 Martin Jambor + + * tree-data-ref.c (dump_data_dependence_relation): Avoid data + reference dumps if ddr is NULL or dependence is unknown. + 2008-03-20 Kaz Kojima * config/sh/linux-atomic.asm (ATOMIC_TEST_AND_SET): Take diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index f8faed813c7..3a204d51621 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -358,17 +358,20 @@ dump_data_dependence_relation (FILE *outf, { 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) -- 2.30.2