From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7F7E53838013; Mon, 9 May 2022 11:42:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F7E53838013 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105517] [13 Regression] Missing diagnostic after recent optimizer improvements Date: Mon, 09 May 2022 11:42:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2022 11:42:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105517 --- Comment #3 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:faabc751d0bb7e7fe86abfe8991b0307d585874a commit r13-205-gfaabc751d0bb7e7fe86abfe8991b0307d585874a Author: Richard Biener Date: Mon May 9 11:33:44 2022 +0200 tree-optimization/105517 - avoid offset truncation during VN When value-numbering an address expression like &p_74(D)->a1x[4294967295].a1; we are accumulating the byte offset in an 64bit integer. When later exploiting the duality between that and a POINTER_PLUS_EXPR we should avoid truncating that offset to fit in the target specific sizetype. While such overflows are generally undefined behavior, exploiting this may leads to spurious missing diagnostics. 2022-05-09 Richard Biener PR tree-optimization/105517 * tree-ssa-sccvn.cc (vn_reference_lookup): Make sure the accumulated offset can be represented in the POINTER_PLUS_EXPR IL. (vn_reference_insert): Likewise. * poly-int.h (sext_hwi): Add poly version of sext_hwi.=