https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99517

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:b0d1a533d62ff137e3d54ccf32cf876e5b49d2ab

commit r10-9483-gb0d1a533d62ff137e3d54ccf32cf876e5b49d2ab
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Thu Mar 11 10:59:18 2021 +0100

    icf: Check return type of internal fn calls [PR99517]

    The following testcase is miscompiled, because IPA-ICF considers the two
    functions identical.  They aren't, the types of the .VEC_CONVERT call
    lhs is different.  But for calls to internal functions, there is no
    fntype nor callee with a function type to compare, so all we compare
    is just the ifn, arguments and some call flags.

    The following patch fixes it by checking the internal fn calls like e.g.
gimple
    assignments where the type of the lhs is checked too.

    2021-03-11  Jakub Jelinek  <ja...@redhat.com>

            PR ipa/99517
            * ipa-icf-gimple.c (func_checker::compare_gimple_call): For
internal
            function calls with lhs fail if the lhs don't have compatible
types.

            * gcc.target/i386/avx2-pr99517-1.c: New test.
            * gcc.target/i386/avx2-pr99517-2.c: New test.

    (cherry picked from commit 070ab283d16d8e8e8bb70f9801aca347f008cbd0)

Reply via email to