From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 46613386EC42; Mon, 29 Jun 2020 18:27:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46613386EC42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593455262; bh=R5+oHsc2zPK2lV309W6jUf2oIdF98kAwb8acFGifq9Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=m2TSL79xVIZ54p5A+73aD59X7KJxl9ZrycV1fpgG0o6I3Ew3gL4eviJ/uFp3SxzMx IMvFq888HTriTjtVkxooLjahp+CT+tthljRi4IMvWBm5S0QTcXiQWjPGqup5Svu9Ee qy1luuSfPR7yORJHslEBUvYxYQTFjR6AwFix7N2I= From: "marxin at gcc dot gnu.org" 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 18:27:42 +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: marxin 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: resolution bug_status 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 18:27:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95971 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|WAITING |RESOLVED --- Comment #6 from Martin Li=C5=A1ka --- All right, so it's caused by cdde1: Assume loop 1 to be finite: it has an exit and -ffinite-loops is on. -ffinite-loops Assume that a loop with an exit will eventually take the exit and not loop indefinitely. This allows the compiler to remove loops that other= wise have no side-effects, not considering eventual endless looping as such. This option is enabled by default at -O2 for C++ with -std=3Dc++= 11 or higher.=