From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9F6D03858C36; Wed, 25 Oct 2023 08:18:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F6D03858C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698221935; bh=1eIV+payC47RFh/HIJwGBaY4URMNDiEMPuoGK4z9t0w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tgFiAfHFAE+EdDsfhRPTi8X34YBWKyNK/PybMBIMQvM5uLf9kFIpk3RLCIUPFbyS4 /XHqVt30sjrpiflEYRlEygYkRe80oaYNlXlY1iXjZlVAo6cT5y3WsB93shA2vBxv5Z ctctL+ojDHlOo8b0muoATdH/KexWLZnF4+zJ7Szw= From: "dale.mengli.ming at proton dot me" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/110520] -Wanalyzer-null-dereference false nagetive with `*ptr = 10086` Date: Wed, 25 Oct 2023 08:18:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dale.mengli.ming at proton dot me X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm 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=3D110520 --- Comment #2 from mengli ming --- (In reply to David Malcolm from comment #1) > Thanks for filing this bug. >=20 > With trunk (for gcc 14) I correctly get a NPD warning (true positive): > https://godbolt.org/z/a5h38cz7d >=20 > With gcc 13.2, I don't (false negative): > https://godbolt.org/z/PKnToYK8v >=20 > I've been rewriting C string handling for gcc 14, so it's likely this now > working is a side-effect of that. >=20 > Keeping open to track adding a regression test for this. Thank you for your explanation. (^_^)=