From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6F6483898524; Mon, 29 Jun 2020 21:43:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F6483898524 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593466999; bh=3gpHFPHYXVM1081uYpLjZ3mRKuNaxUWIxynLqt9OjRE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KYuui2K+u/7vzU8JOe0P7bDQ9bTRQMs7Ox6Is6Hc+qmdTX8dTRubt9Clxbusixf8l Wb19ok4eU02yYX456/aAqFYcb0TLddv0HGVUkNQ0mivacqtonz25weRU/da8RzZhA9 U+g2WwCsUWJG+2zbVCeOzW0if2OiyLs9o7PZ3uOc= From: "0xe2.0x9a.0x9b at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/95971] [10 regression] Optimizer converts a false boolean value into a true boolean value Date: Mon, 29 Jun 2020 21:43:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: 0xe2.0x9a.0x9b at gmail dot com 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: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 21:43:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95971 --- Comment #12 from Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0x9b at g= mail dot com> --- (In reply to Marc Glisse from comment #11) > while(!a.isZero()); >=20 > that doesn't look like something you would find in real code. Are you > waiting for a different thread to modify a? Then you should use an atomic > operation. Are you waiting for the hardware to change something? Use > volatile. Do you really want an infinite loop? Spell it out > if(!a.isZero())for(;;); The code I sent is a downsized version of a larger code, which means that t= he posted code isn't the real code.=