Fix overflows in ipa-modref-tree.cc
authorJan Hubicka <jh@suse.cz>
Wed, 20 Apr 2022 09:00:33 +0000 (11:00 +0200)
committerJan Hubicka <jh@suse.cz>
Wed, 20 Apr 2022 09:00:33 +0000 (11:00 +0200)
commit0707f4280907c395b543464175411f8155817a9e
treebd65a6b7a3bf6b1adfeb10fa3e5af69b12e39e89
parent2a6d372ba96cc0836bfd46579ad78c1ee5a3cf8a
Fix overflows in ipa-modref-tree.cc

gcc/ChangeLog:

2022-04-20  Jan Hubicka  <hubicka@ucw.cz>

PR ipa/103818

* ipa-modref-tree.cc (modref_access_node::closer_pair_p): Use
poly_offset_int to avoid overflow.
(modref_access_node::update2): likewise.

gcc/testsuite/ChangeLog:

2022-04-20  Jan Hubicka  <hubicka@ucw.cz>

* gcc.c-torture/compile/103818.c: New test.
gcc/ipa-modref-tree.cc
gcc/testsuite/gcc.c-torture/compile/103818.c [new file with mode: 0644]