From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 233A73858C51; Mon, 20 Jun 2022 11:40:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 233A73858C51 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106027] [11/12/13 Regression] ICE: 'verify_gimple' failed (error: mismatching comparison operand types) since r11-2450-g10231958fcfb13bc Date: Mon, 20 Jun 2022 11:40:08 +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: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 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, 20 Jun 2022 11:40:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106027 --- Comment #3 from Richard Biener --- So the issue seems to be that #4 0x0000000000f82be3 in fold_binary_loc (loc=3D2147483656,=20 code=3DTRUTH_ANDIF_EXPR, type=3D,=20 op0=3D, op1=3D) at /space/rguenther/src/gcc/gcc/fold-const.cc:12044 /* A < X && A + 1 > Y =3D=3D> A < X && A >=3D Y. Normally A + 1 > Y means A >=3D Y && A !=3D MAX, but in this case we know that A < X <=3D MAX. */ if (!TREE_SIDE_EFFECTS (arg0) && !TREE_SIDE_EFFECTS (arg1)) { tem =3D fold_to_nonsharp_ineq_using_bound (loc, arg0, arg1); if (tem && !operand_equal_p (tem, arg0, 0)) return fold_build2_loc (loc, code, type, tem, arg1); tem =3D fold_to_nonsharp_ineq_using_bound (loc, arg1, arg0); if (tem && !operand_equal_p (tem, arg1, 0)) return fold_build2_loc (loc, code, type, arg0, tem); builds unsigned type TRUTH_ANDIF_EXPR with signed type arg0/tem (op0/op1 are conversions to unsigned type). The offending revision just chokes on the invalid input.=