From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 367B03858426; Fri, 20 Oct 2023 21:36:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 367B03858426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697837774; bh=gUduhsU6WymeIJh7faDYZjIk2kQ1j9pEOf+vhzg8M14=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SoVJc/wkFlEe84k4Tz8a4KZUq3hoXzVmQRXFmt47PyxcB/AegisGUhKOVxbbXqhMZ pDNaYfg/npT7afHw90zhkeD/wNQDllfDVbkVrf9h/RDL4x91pWPQhziOw7ZnQJ6yXO C8NZ1RaXkruVFTug3lmRdjD8qshDN0RD3QjcVJKk= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/111903] [14 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc:567 with -mno-sse2 and _Float16 Date: Fri, 20 Oct 2023 21:36:13 +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: 14.0 X-Bugzilla-Keywords: error-recovery, ice-checking, 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: 14.0 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=3D111903 --- Comment #2 from Andrew Pinski --- This fixes the issue: diff --git a/gcc/convert.cc b/gcc/convert.cc index 64b7001843c..5357609d8f0 100644 --- a/gcc/convert.cc +++ b/gcc/convert.cc @@ -1006,8 +1006,13 @@ convert_to_complex_1 (tree type, tree expr, bool fol= d_p) case ENUMERAL_TYPE: case BOOLEAN_TYPE: case BITINT_TYPE: - return build2 (COMPLEX_EXPR, type, convert (subtype, expr), - convert (subtype, integer_zero_node)); + { + tree real =3D convert (subtype, expr); + tree imag =3D convert (subtype, integer_zero_node); + if (error_operand_p (real) || error_operand_p (imag)) + return error_mark_node; + return build2 (COMPLEX_EXPR, type, real, imag); + } case COMPLEX_TYPE: {=