From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 44C513858C78; Thu, 4 May 2023 16:40:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44C513858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683218416; bh=z17+VUJfoQIKUqPXUTiXVXYyPAdSBlo+4Eo0Toj9dJQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gHk06R3J7kHzZnCbAsxpLPHTVaQGtvJQDH81EnMaTEf+fAuno0ZvX8FvZlag8Cisx SDnwHebDUnEDFrYeclGBC7afQndE2NpfcvEGrmZyIVlm0C0VhtDbgTO32xcbmm43wL YP8x9yBArAHzHCxctLF5c7hJalCNZsxEz/HGQyvg= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109732] [14 regression] gcc miscompiles iterator comparison on nlohmann_json since r14-204-gf1f5cbaa3f716f Date: Thu, 04 May 2023 16:40:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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=3D109732 --- Comment #10 from Andrew Pinski --- Created attachment 54998 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54998&action=3Dedit Gimple testcase that fails at runtime too -O1 -fgimple -fdisable-tree-ethread -fdisable-tree-fre1 The thing is you need the false edge to be the first successor edge of BB2.= So you have to get forwprop to swap the edges from being true and false. Also gimple front-end does not like bool constants that well.=