summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-data-ref.c15
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 <mjambor@suse.cz>
+
+ * 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 <kkojima@gcc.gnu.org>
* 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)