From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8E210383FB94; Fri, 13 Jan 2023 19:58:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E210383FB94 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673639912; bh=+53FU/r3RHlYeMxzpNmTnNsaCmdWfZOwLlyY0VKjUpA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jVC/neEHcUNgqJG8gZtmcd0te1tASL6qdEn46NEXyfuvcuxp+7wc9dpVLccMMFrxo Ml3T2UXPzqJQSEthcj2355Z1+961xozMBLRoRlIx6kU3fZQdT/mvsmiJkonQUS5Dmv RlXEqoC9yp2PvEODOeStkfLtP6XhpwHPhOC7j2po= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108398] tree-object-size trips up with pointer arithmetic if an intermediate result is an invalid pointer Date: Fri, 13 Jan 2023 19:58:32 +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: 12.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108398 --- Comment #8 from Jakub Jelinek --- -fsanitize=3Dundefined with no diagnostics doesn't mean code is UB free. This testcase is still invalid. Before the first g--;, g =3D=3D &e, so g-- will set g to g - sizeof (int). = That is UB.=