From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C4BC3858D32; Fri, 13 Jan 2023 09:26:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C4BC3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673602016; bh=/4UsB00PqFPZxArNLVgcobLFNK8L73eMVtmgrin97N0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IwBNUZrlF+qVenUDyA3WUFR4dxlftbsIgVGFJCv2270uXc8H8HIZ6KHKPs2yUQDY0 MvlVFLC1saz9vivpHQdRW/EepyPuCc7AB88xUpvlR8DevzxwVYS/ToFp4zP3cQyY9j C7u79yK9uajgnCt450G/ouXp+DEWNCGXAIXybFKM= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108385] [12 Regression] false positive -Wfree-nonheap-object Date: Fri, 13 Jan 2023 09:26:56 +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.0 X-Bugzilla-Keywords: diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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=3D108385 --- Comment #6 from Richard Biener --- (In reply to Richard Biener from comment #5) > [E]VRP testcase which shows the odd 'off' range on the false edge: >=20 > void bar(char *); >=20 > void foo (char *p, char *pp, int off) > { > char *q =3D p + off; > if (q !=3D p) > bar (q); > char *qq =3D pp + off; > if (qq !=3D pp) > bar (qq); > bar (p); > bar (pp); > } In the old VRP code the register_edge_assert_for_* routines would be the ones to add pattern matching for this. I can't find where such code exists in ranger now - I suspected it might be in range-op when solving q =3D p + off; with q =3D=3D p, but that operates on ranges and not equivalences only?=