On Tue, Aug 8, 2017 at 1:11 PM, Martin Liška <mli...@suse.cz> wrote:
> Hello.
>
> As LABEL_DECL can point to another function (non-local goto), we must properly
> compare them.
>
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>
> Ready to be installed ?

Ok.

So with bb1 == bb2 == NULL could you equate them in case the DECL_CONTEXT
functions were merged by ICF (and the labels)?  (I guess it's not
worth the trouble)

Thanks,
Richard.

> Martin
>
> gcc/ChangeLog:
>
> 2017-08-08  Martin Liska  <mli...@suse.cz>
>
>         PR tree-opt/81696
>         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
>         LABEL_DECLs that can be from a different function.
>
> gcc/testsuite/ChangeLog:
>
> 2017-08-08  Martin Liska  <mli...@suse.cz>
>
>         PR tree-opt/81696
>         * gcc.dg/ipa/pr81696.c: New test.
> ---
>  gcc/ipa-icf-gimple.c               |  6 +++++-
>  gcc/testsuite/gcc.dg/ipa/pr81696.c | 26 ++++++++++++++++++++++++++
>  2 files changed, 31 insertions(+), 1 deletion(-)
>  create mode 100644 gcc/testsuite/gcc.dg/ipa/pr81696.c
>
>

Reply via email to