https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109303
--- Comment #10 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:da3fd01757297c1d20cf3dcd76046488da737569 commit r13-6986-gda3fd01757297c1d20cf3dcd76046488da737569 Author: Martin Jambor <mjam...@suse.cz> Date: Mon Apr 3 15:53:36 2023 +0200 ipa: Avoid constructing aggregate jump functions with huge offsets (PR 109303) We are in the process of changing data structures holding information about constants passed by reference and in aggregates to use unsigned int offsets rather than HOST_WIDE_INT (which was selected simply because that is what fell out of get_ref_base_and_extent at that time) in order to conserve memory, especially at WPA time. PR 109303 testcase discovers that we do not properly check that we only create jump functions with offsets (plus sizes) that fit into the smaller type. This patch adds the necessary check. gcc/ChangeLog: 2023-03-30 Martin Jambor <mjam...@suse.cz> PR ipa/109303 * ipa-prop.cc (determine_known_aggregate_parts): Check that the offset + size will be representable in unsigned int. gcc/testsuite/ChangeLog: 2023-03-30 Jakub Jelinek <ja...@redhat.com> Martin Jambor <mjam...@suse.cz> PR ipa/109303 * gcc.dg/pr109303.c: New test.