aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.cc
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2023-04-03 15:53:36 +0200
committerMartin Jambor <mjambor@suse.cz>2023-04-03 16:00:54 +0200
commitda3fd01757297c1d20cf3dcd76046488da737569 (patch)
treef7ee666c0d9ea2890862050f9c9dea14d23c4934 /gcc/fold-const.cc
parentb0248580b68d970788bb43ac3ab8fe3e21ef71be (diff)
downloadgcc-da3fd01757297c1d20cf3dcd76046488da737569.zip
gcc-da3fd01757297c1d20cf3dcd76046488da737569.tar.gz
gcc-da3fd01757297c1d20cf3dcd76046488da737569.tar.bz2
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 <mjambor@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 <jakub@redhat.com> Martin Jambor <mjambor@suse.cz> PR ipa/109303 * gcc.dg/pr109303.c: New test.
Diffstat (limited to 'gcc/fold-const.cc')
0 files changed, 0 insertions, 0 deletions