From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4DB74386F037; Mon, 29 Jun 2020 18:44:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4DB74386F037 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593456245; bh=JXT5HH7a5WO5e5cPROvk9eQh2RrHTZqlsS1QXMqwUKE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SC6ykNcrdMYIasxLAvaApaPRrB9neorsjfQ8/vRfPmnQ7X7cwkQ72SE+t0fzJrEiw 721aEmNM37dbuRjvZgW0HS2l3PVFcTTwspAckEzLO+QusqzCo/gEcVgb/4zk31Qj8U U0OCMxj68FbojV1XD+19NcMAWwm0Ays1aPdj4Vjc= 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 18:44:05 +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 18:44:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95971 --- Comment #7 from Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0x9b at gm= ail dot com> --- (In reply to Martin Li=C5=A1ka from comment #6) > All right, so it's caused by cdde1: >=20 > Assume loop 1 to be finite: it has an exit and -ffinite-loops is on. >=20 > -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 > otherwise have no side-effects, not considering eventual endless looping = as > such. >=20 > This option is enabled by default at -O2 for C++ with -std=3Dc= ++11 > or higher. Thank you for the explanation. Your mindset is forcing me to stop using g++ over time because of reliabili= ty concerns during application development. Sincerely Jan=