This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR 66301
- From: Martin Jambor <mjambor at suse dot cz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 11 Jun 2015 18:34:09 +0200
- Subject: [PATCH] Fix PR 66301
- Authentication-results: sourceware.org; auth=none
Hi,
the following patch is a quick fix for PR 66301.
eliminate_dom_walker::before_dom_children in tree-ssa-pre.c calls
dump_possible_polymorphic_call_targets when dump_enabled_p returns
true, but the function assumes dump_file is not NULL while the
predicate also returns true when alt_dump_file is not NULL (and
dump_file is).
There were no comments from the author of the new dumping interface in
bugzilla and so I suggest we simply check the dump_file like almost
everywhere else.
Bootstrapped and tested on x86_64-linux. I do not have a testcase
because the one in bugzilla is biggish and it did not seem worth
reducing.
OK for trunk and the 5 branch?
Martin
diff --git a/gcc/ChangeLog.mine b/gcc/ChangeLog.mine
new file mode 100644
index 0000000..a26c4d4
--- /dev/null
+++ b/gcc/ChangeLog.mine
@@ -0,0 +1,6 @@
+2015-06-11 Martin Jambor <mjambor@suse.cz>
+
+ PR debug/66301
+ * tree-ssa-pre.c (before_dom_children): Check that dump_file is not
+ NULL instead of calling dump_enabled_p.
+
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 192084f..2cd0b67 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -4381,7 +4381,7 @@ eliminate_dom_walker::before_dom_children (basic_block b)
(OBJ_TYPE_REF_TOKEN (fn)),
context,
&final);
- if (dump_enabled_p ())
+ if (dump_file)
dump_possible_polymorphic_call_targets (dump_file,
obj_type_ref_class (fn),
tree_to_uhwi