From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 15D793853515; Fri, 27 Oct 2023 17:50:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15D793853515 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698429043; bh=oNL4BxPDQTroayGWvs6wTjy7GorQ6u3/PvDpwT/49Ro=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Cv6ep71Qkf5BcLNHwDyt1CmevTnI5pDxcxyWFgAMfpOiZcKAMrBp7jyjjoqMYhK87 nRpcwo+cf7Heru9Dz7BUN1vtwfgLyyKtzH1VGU6cajnnfOcH3un4J2O2LHwEGr53jN 8kmJfJ+22N6bcYtPPKFyQKeBLomkvJRvWs+DwpiU= From: "alexey.lapshin at espressif dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/109131] -Wanalyzer-deref-before-check false positive seen in git's builtin/show-ref.c Date: Fri, 27 Oct 2023 17:50:42 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: alexey.lapshin at espressif dot com X-Bugzilla-Status: UNCONFIRMED 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: cc 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=3D109131 Alexey changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexey.lapshin at espressi= f dot co | |m --- Comment #1 from Alexey --- There is a smaller reproducer: ``` struct a { int b; }; void foo(struct a *p) { if (p->b) p =3D 0; if (p && p->b) // "p" can be 0 but warning ; } ```=