From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22E1B3858CDB; Thu, 23 Mar 2023 18:05:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22E1B3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679594713; bh=4TzlTFPzr5m7XXdvsJSdWnvsmJ/eDv4mg40nQp57/dw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IPA4OCxxYKN4XxeJ3WBEeLpea/fFDANaLAZ/Fg9TIEs25Ax6lHzl1P5Z8cXnFfovv v344ewVo6Hqi4jWUqLcLB3+mAw3Fxl/bA8KDwjSziGUDCfJRQZZPK4W8xp9/l/Ldv6 l9KhaG4R6BZIEbrUnkcfnNfKYQ1qEgerCCYLj+6w= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101150] [11/12/13 Regression] null pointer dereference false positive disappears when compiling an additional function Date: Thu, 23 Mar 2023 18:05: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: 11.1.0 X-Bugzilla-Keywords: diagnostic, missed-optimization, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords cf_known_to_work 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=3D101150 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |needs-bisection Known to work| |13.0 --- Comment #5 from Andrew Pinski --- On the trunk, the warning is gone so is the missed optimization mentioned in comment #1. We do have another missed optimization though: _12 =3D _9 - _15; _7 =3D _12 /[ex] 4; _18 =3D (long unsigned int) _7; _120 =3D _18 !=3D 0; _54 =3D _12 !=3D 0; _127 =3D _54 & _120; if (_127 !=3D 0) goto ; [16.50%] else goto ; [83.50%] ... [local count: 98623186]: if (_9 !=3D _15) goto ; [89.00%] else goto ; [11.00%] Only one of those comparisons is actually needed. and then another missing = jump threading because _9 be equal _15 on the goto branch.=