https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105639
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Jambor <jamb...@gcc.gnu.org>: https://gcc.gnu.org/g:f571596f8cd8fbad34305b4bec1a813620e0cbf0 commit r13-798-gf571596f8cd8fbad34305b4bec1a813620e0cbf0 Author: Martin Jambor <mjam...@suse.cz> Date: Fri May 27 13:05:40 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.