This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR ipa/65908.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Martin LiÅka <mliska at suse dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Fri, 15 May 2015 12:38:32 +0200
- Subject: Re: [PATCH] Fix PR ipa/65908.
- Authentication-results: sourceware.org; auth=none
- References: <5555B0A1 dot 1060702 at suse dot cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, May 15, 2015 at 10:38:57AM +0200, Martin LiÅka wrote:
> Following patch is fix for GCC-5 branch for PR ipa/65908, was tested on x86_64-linux-pc, as well as bootstrapped.
> As soon as the patch is applied, I'm going to send the similar patch for trunk.
I'll leave the review to Honza or Richi, just a few nits:
1) it should go to the trunk first, then to GCC-5 branch
> --- a/gcc/ipa-icf.c
> +++ b/gcc/ipa-icf.c
> @@ -417,6 +417,33 @@ bool sem_function::compare_edge_flags (cgraph_edge *e1, cgraph_edge *e2)
> return true;
> }
> +/* Return true if DECL_ARGUMENT types are valid to be merged. */
Please add another newline between } and the comment.
> --- a/gcc/ipa-icf.h
> +++ b/gcc/ipa-icf.h
> @@ -364,6 +364,9 @@ private:
> bool equals_private (sem_item *item,
> hash_map <symtab_node *, sem_item *> &ignored_nodes);
> + /* Return true if DECL_ARGUMENT types are valid to be merged. */
> + bool compatible_parm_types_p ();
> +
> /* Returns true if tree T can be compared as a handled component. */
> static bool icf_handled_component_p (tree t);
And here should be an empty line above the Return true if ... comment
too. Though, I wonder how this can apply cleanly to the current 5 branch,
because there is an empty newline in between equals_private and the comment
above icf_handled_component_p.
> diff --git a/gcc/testsuite/g++.dg/ipa/pr65908.C b/gcc/testsuite/g++.dg/ipa/pr65908.C
> new file mode 100644
> index 0000000..c1884ab
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/ipa/pr65908.C
> @@ -0,0 +1,26 @@
> +// PR ipa/65908
> +// { dg-options "-O2 -fPIC" }
> +// { dg-do compile { target { { fpic } } } }
Perhaps
// PR ipa/65908
// { dg-do compile }
// { dg-options "-O2" }
// { dg-additional-options "-fPIC" { target fpic } }
instead?
Jakub