From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 30277385F341; Tue, 31 Jan 2023 14:58:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 30277385F341 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675177096; bh=AWNGKBgdbdvGXsn66ypyZsDgFJLiwdMREZl7plD4WQ4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HGI81YTuGT6w1x/FN+CiqeoY8I/Zh3EuDIPUkMVRM7GAFd6XO1Z1nHQ+dfP1YGAea X+DgBEbNgjz8qKg9S+FC2FSO0bdWUBk54fk+nNmarw6e31wt4nAkMtHq6iWHllgnIj THBEFzOfbgcL/GGvWAa0zuZ4JZqvh8IDN59VpNnE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108385] [12 Regression] false positive -Wfree-nonheap-object Date: Tue, 31 Jan 2023 14:58:12 +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: cvs-commit 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 #9 from CVS Commits --- The master branch has been updated by Andrew Macleod : https://gcc.gnu.org/g:1626ec53e8c1b9c245572417d380e3ed84990cff commit r13-5579-g1626ec53e8c1b9c245572417d380e3ed84990cff Author: Andrew MacLeod Date: Tue Jan 17 11:39:47 2023 -0500 Add op2_range to pointer_plus. Implement op2_range for pointer_plus to determine the offset (operand 2= ) is zero or non-zero based on equality/inequality between the LHS and op1. Also allow GORI computations to continue if the LHS is VARYING and there is also a relation. PR tree-optimization/108385 gcc/ * gimple-range-gori.cc (gori_compute::compute_operand_range): Allow VARYING computations to continue if there is a relation. * range-op.cc (pointer_plus_operator::op2_range): New. gcc/testsuite/ * gcc.dg/pr108385.c: New.=