From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7F32A3858428; Mon, 17 Jun 2024 16:19:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F32A3858428 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718641146; bh=IUPfUx4smgWuFOUXMFHIO5pyK2wKR99XRmnu2MJN4VI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MczkgzIc1VGLcxXBCnC38E3Es2ro222pRYmjXG9EWYlFN7woTLlCu3IJcGYPzt9pd X9WqroZFCpKhXPVModZ7VeAXO9xohtHqU/qIsSqkU8f4payoVwxuvssThh7SkdiTiM EQHOTuRo21c/ZSBPks670RkyAfxtwVx5rJEfNHhE= From: "roger at nextmovesoftware dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/115489] [12/13/14/15 regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc:589 since r12-3278-g823685221de986 Date: Mon, 17 Jun 2024 16:19:05 +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: 15.0 X-Bugzilla-Keywords: error-recovery, ice-checking, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: roger at nextmovesoftware dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: component 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=3D115489 Roger Sayle changed: What |Removed |Added ---------------------------------------------------------------------------- Component|c |tree-optimization --- Comment #3 from Roger Sayle --- The call to gimplify_expr on line 651 of gimplify.cc (in internal_get_tmp_v= ar) doesn't check its return value, which for this test case is GS_ERROR. It looks like internal_get_tmp_var's callers don't expect that it could ever fail, so it's unclear whether returning NULL_RTX or error_mark_node would be safe. One approach might be to record the original type of val (which gets turned into error_mark_node by the failing gimplify_expr call), then use this type= to call make_ssa_name if things have gone wrong [an uninitialized SSA name may cause fewer downstream issues than an error_mark_node].=