https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Siddhesh Poyarekar <siddh...@gcc.gnu.org>: https://gcc.gnu.org/g:026d44cbbd42653908f9faf6b80773f03e1bb1a0 commit r12-6478-g026d44cbbd42653908f9faf6b80773f03e1bb1a0 Author: Siddhesh Poyarekar <siddh...@gotplt.org> Date: Tue Jan 11 16:07:29 2022 +0530 tree-optimization/103961: Never compute offset for -1 size Never try to compute size for offset when the object size is -1, which is either unknown maximum or uninitialized minimum irrespective of the osi->pass number. gcc/ChangeLog: PR tree-optimization/103961 * tree-object-size.c (plus_stmt_object_size): Always avoid computing offset for -1 size. gcc/testsuite/ChangeLog: PR tree-optimization/103961 * gcc.dg/pr103961.c: New test case. Co-authored-by: Jakub Jelinek <ja...@redhat.com> Signed-off-by: Siddhesh Poyarekar <siddh...@gotplt.org>