From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9A4D2383B6DD; Tue, 6 Dec 2022 19:09:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A4D2383B6DD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670353762; bh=mJsH4L490qsTcaorzA4qmPavQIh1LZCwXPonXljyT2A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=L0ik7GEpjDkR7+HESFQMh1ks9Hbycuo3LyctCyUpd62XMRZn1FMyRAljImTMj4G5A yUmSC0bi0wl2vKjvOUKIC0d3KZpg2pCMXibD3ybTfj5HE98RvQwQ+rqLFlrD5S30tj O8F2E6tFSA1BfxpZyL0rXhsNf+2zocQ8KGRODYqA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107994] [12/13 Regression] ICE in fold_convert_loc, at fold-const.cc:2606 Date: Tue, 06 Dec 2022 19:09:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: error-recovery, ice-on-invalid-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: 12.3 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107994 --- Comment #2 from Andrew Pinski --- This should fix the issue (have not tested it yet): diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc index 02415cb1b5c..ae13f9fd9e6 100644 --- a/gcc/gimplify.cc +++ b/gcc/gimplify.cc @@ -17098,6 +17098,9 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, memcmp for them would be very inefficient at best, and is plain wrong if bitfields are involved. */ { + if (error_operand_p (TREE_OPERAND (*expr_p, 1)) + return GS_ERROR; + tree type =3D TREE_TYPE (TREE_OPERAND (*expr_p, 1)); /* Vector comparisons need no boolification. */=