This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR 66301
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 16 Jun 2015 12:58:46 +0200
- Subject: Re: [PATCH] Fix PR 66301
- Authentication-results: sourceware.org; auth=none
- References: <20150611163408 dot GZ2305 at virgil dot suse>
On Thu, Jun 11, 2015 at 6:34 PM, Martin Jambor <mjambor@suse.cz> wrote:
> 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?
Ok.
But I think dump_possible_polymorphic_call_targets should be ajdusted
to how dumping works now (thus _not_ pass an explicit FILE). Eventually
this could be done with a function template wrapper
dump_fn <dump_possible_polymorphic_call_targets> (MSG_NOTE, ...);
which calls dump_possible_... possibly twice. The function template
would need to be varargs and all functions called by it need to be va-list
taking functions though...
Richard.
> 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