From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 94D72385773E; Thu, 11 May 2023 21:52:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 94D72385773E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683841926; bh=UDHV6Owbw04K/uN+VFFLKFDJEmnsHaMdfFxzcX4VqZM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LOhEWSnlvSBhGT3LkteyUw82fuh8HY9ghxg6T2zBste4ZByESUtqA7ufN/BuXq35H DrRiwXNjR9k9QZEH+gioK6VrGu18mB/R/NLLmW7YLKP+V0tUe0H87jGxnt0lS2JO6G NxD/aUOx7gSK2F94/Ot/0D1wd9oxXq7d79OraLzg= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109820] False-positive in tautological-compare Date: Thu, 11 May 2023 21:52:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: bug_status resolution 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=3D109820 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski --- This is definitely not a false positive. if (((test >> 4) & 0x15) =3D=3D 0x9) a & 0x15 will never be equal to 0x9. The only bits 0x15 and 0x9 share in common is 0x1 (that is 0x9 & 0x15 is 0x= 1) so that above bitwise comparison will always be false and that is exactly w= hat the compiler is warning about.=