From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 321DE3858425; Wed, 21 Dec 2022 07:53:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 321DE3858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671609202; bh=q6kC/bYhtugEqfLpXfV6ZzWvtJ0Mwrziwmzg9/OvLCw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wQRdGUgPwob6BYrCnrAzDvA2YVH+J0+NUmmKdD456by9YZ2N8cP2TeKbE4XDXIxuC STXAanpDao/v2CynUnrQLweYSFkR2XspYL4tcV5mvPG3aLknZf4iCW5v3Ui5roOAvb fbzthikncgvNiWIkfX014WX1/IYpOKTOf+DN8bCE= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108187] False positive -Wfree-nonheap-object on impossible path with -O1 Date: Wed, 21 Dec 2022 07:53:21 +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.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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=3D108187 --- Comment #1 from Richard Biener --- Well, between the store to ->source and the read from it is the call to dp_packet_use_afxdp which gets &xpacket->packet as argument and thus needs to be treated as clobbering ->source. So GCC can indeed not know that ->source is DPBUF_AFXDP since the path is not provable impossible. dp_packet_use_afxdp doesn't even get a const struct dp_packet * argument (not that this would semantically change things in C).=