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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Martin Jambor
<jamb...@gcc.gnu.org>:

https://gcc.gnu.org/g:081c472589329fc6c58c4dfed70f1fbc029083a5

commit r12-8437-g081c472589329fc6c58c4dfed70f1fbc029083a5
Author: Martin Jambor <mjam...@suse.cz>
Date:   Mon May 30 22:04:21 2022 +0200

    ipa: Check cst type when propagating controled uses info

    PR 105639 shows that code with type-mismatches can trigger an assert
    after runnning into a branch that was inteded only for references to
    variables - as opposed to references to functions.  Fixed by moving
    the condition from the assert to the guarding if statement.

    gcc/ChangeLog:

    2022-05-25  Martin Jambor  <mjam...@suse.cz>

            PR ipa/105639
            * ipa-prop.cc (propagate_controlled_uses): Check type of the
            constant before adding a LOAD reference.

    gcc/testsuite/ChangeLog:

    2022-05-25  Martin Jambor  <mjam...@suse.cz>

            PR ipa/105639
            * gcc.dg/ipa/pr105639.c: New test.

    (cherry picked from commit f571596f8cd8fbad34305b4bec1a813620e0cbf0)

Reply via email to