From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 894C03858C55; Thu, 13 Oct 2022 17:06:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 894C03858C55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665680814; bh=VTazGS4fBgFtVKJ2z+Z88w7IcbnTH6b13etnfj3Lr7c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ev2kJfCBLvaqpE9l2rwHYos42SkjhkYnytSkT59Od1dt2vVXZJM7VxHYoZAqsXZlG p2e9l3KxrJhicL6YkBI87CTW74ubRkldZn7+H7a8wwFp3gRwMUsEKkrpv0UGPdI64I ggPbHgYF6a56EM5JGI7Zt7igQPrTUaJeomSCtX6w= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107252] False positive stringop-overflow, warning disappears if I remove unrelated code! Date: Thu, 13 Oct 2022 17:06:54 +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: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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=3D107252 --- Comment #3 from Andrew Pinski --- (In reply to Carlos Galvez from comment #2) > To clarify, even removing things from the second function has an impact on > the first function (which is where the warning comes from). Shouldn't both > functions be independent? No because inlining heuristics takes into account the whole translation uni= t so removing things changes how much inlining happens or where it happens (etc.= ). The diagnostic with the warning is dependent on the inlining and optimizati= on. Someone will need to look into the debug dumps to understand what exactly is going on though.=