https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119530
--- Comment #4 from GCC 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:de1c734a8ae034c92f485e7f58b7fcb1c921ecd2 commit r15-9427-gde1c734a8ae034c92f485e7f58b7fcb1c921ecd2 Author: Martin Jambor <mjam...@suse.cz> Date: Mon Apr 14 14:21:15 2025 +0200 ipa-cp: Make propagation of bits in IPA-CP aware of type conversions (PR119318) After the propagation of constants and value ranges, it turns out that the propagation of known bits also needs to be made aware of any intermediate types in which any arithmetic operations are made and must limit its precision there. This implements just that, using the newly collected and streamed types of the operations involved. This version removed the extra check that the type of a formal parameter is known pointed out in Honza in his review because I agree it is currently always known. I have also added the testcase of PR 119530 which is a duplicate of this bug. gcc/ChangeLog: 2025-04-11 Martin Jambor <mjam...@suse.cz> PR ipa/119318 * ipa-cp.cc (ipcp_bits_lattice::meet_with_1): Set all mask bits not covered by precision to one. (ipcp_bits_lattice::meet_with): Likewise. (propagate_bits_across_jump_function): Use the stored operation type to perform meet with other lattices. gcc/testsuite/ChangeLog: 2025-04-11 Martin Jambor <mjam...@suse.cz> PR ipa/119318 * gcc.dg/ipa/pr119318.c: New test. * gcc.dg/ipa/pr119530.c: Likwise.