https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103215
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Sebor <mse...@gcc.gnu.org>: https://gcc.gnu.org/g:243a980437b5e7fca56587bf86667005bdf343a7 commit r12-5871-g243a980437b5e7fca56587bf86667005bdf343a7 Author: Martin Sebor <mse...@redhat.com> Date: Thu Dec 9 12:49:28 2021 -0700 Extend the offset and size of merged object references [PR103215]. Resolves: PR tree-optimization/103215 - bogus -Warray-bounds with two pointers with different offsets each gcc/ChangeLog: PR tree-optimization/103215 * pointer-query.cc (access_ref::merge_ref): Extend the offset and size of the merged object instead of using the larger. gcc/testsuite/ChangeLog: PR tree-optimization/103215 * gcc.dg/Wstringop-overflow-58.c: Adjust and xfail expected warnings. * gcc.dg/Wstringop-overflow-59.c: Same. * gcc.dg/warn-strnlen-no-nul.c: Same. * gcc.dg/Warray-bounds-91.c: New test. * gcc.dg/Warray-bounds-92.c: New test. * gcc.dg/Wstringop-overflow-85.c: New test. * gcc.dg/Wstringop-overflow-87.c: New test.