]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/110043 - avoid overflow in pointer-query
authorRichard Biener <rguenther@suse.de>
Tue, 27 Jan 2026 14:43:53 +0000 (15:43 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 28 Jan 2026 08:11:26 +0000 (09:11 +0100)
commit7fdb0e1b186b8ade38d454504e3f8bba2b17a9ea
tree8ba61b45ecd8ad75b44a1f0ee56a9b7526c3eea6
parent11ef3c2e4fb97fc200edb74ce602960af0eaa354
tree-optimization/110043 - avoid overflow in pointer-query

pointer-query is built around using offset_int to avoid needing
to deal with overflow.  This falls apart when trying to analyze
array accesses indexed by __int128.  So don't.

PR tree-optimization/110043
* pointer-query.cc (get_offset_range): Fail for integer
types with precision larger than ptrdiff_type_node.

* gcc.dg/torture/pr110043.c: New testcase.
gcc/pointer-query.cc
gcc/testsuite/gcc.dg/torture/pr110043.c [new file with mode: 0644]