]> git.ipfire.org Git - thirdparty/gcc.git/commit
ipa/116296 - avoid overflow in modref_access_node::contains
authorRichard Biener <rguenther@suse.de>
Tue, 27 Jan 2026 12:01:19 +0000 (13:01 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 27 Jan 2026 14:59:55 +0000 (15:59 +0100)
commitef652d7bd4faf389c7963a8cb4e720df0dc73140
tree9089cf17bea7f9d1bf108f5d7b33784d416a1938
parentb227c79c4331acdf1f1928b7a01ba3c03e00e6cb
ipa/116296 - avoid overflow in modref_access_node::contains

The following aovids overflow when scaling the param offset
difference by BITS_PER_UNIT by using poly_offset_int instead of
poly_int64 for the computations.

PR ipa/116296
* ipa-modref-tree.cc (modref_access_node::contains): Use
poly_offset_int for the param offset difference and the
overlap computation.

* gcc.dg/torture/pr116296.c: New testcase.
gcc/ipa-modref-tree.cc
gcc/testsuite/gcc.dg/torture/pr116296.c [new file with mode: 0644]