From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 143BD3852205; Mon, 21 Nov 2022 14:51:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 143BD3852205 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669042301; bh=6YJcFyLCY+ond8ooKwnk806egA8anPMZcY+ARR8RSfc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=aPnhyflO+KO8PNOLQBUPFpM9GKqXIw6aiKHLsdjnMe+jq3dqBtbCL6rBnbN4whX8w sOoPg9YwwzuEAJNPULS3Z8DDvbzF4iLV4gi7T+eLfHt2mJ8D9D82ZWY/kxvDz/F/D3 zmHbMo4i3OE5iOzL9LVZ7WYBVA4OPgo8zqdLdxdU= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107465] [10/11/12/13 Regression] Bogus warning: promoted bitwise complement of an unsigned value is always nonzero Date: Mon, 21 Nov 2022 14:51:40 +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: 11.3.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 10.5 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=3D107465 --- Comment #6 from Jakub Jelinek --- I bet the warning also doesn't make really sense for the case where we'd ha= ve unfolded BIT_NOT_EXPR of a constant compared to non-constant, so which of t= he operands is BIT_NOT_EXPR should determine which operand to check tree_fits_shwi_p on (the other one).=