From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 245583858D28; Mon, 15 Jan 2024 23:41:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 245583858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705362082; bh=87cK1aDUjbZzoVX+PopWOKtwM73ZjLro3aoqxNPR6ck=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jUG1BS3Algqt9DCkpAutDYpG64LLpMpXXx/zjrsmut+9vrW63JY4HtgsiuOvzxg4o uTeWVgJiPa4ovFeV7ESLK7FH/QsC/1HV001jYPTCP7YtI3hand3w8qaNaHhEnBMKiJ ON1Huzhdl+kZbrRU1W8YdG2KAAQM8GXCv7mke3ZQ= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113406] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:85 with -fstrub=internal and _BitInt() Date: Mon, 15 Jan 2024 23:41:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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: cf_reconfirmed_on bug_status everconfirmed 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=3D113406 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-01-15 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Component|tree-optimization |middle-end --- Comment #1 from Andrew Pinski --- Confirmed, scrub is changing the IR to: ``` void * .strub.watermark.2; _BitInt(146) retval.1; [local count: 10000]: __builtin___strub_enter (&.strub.watermark.2); retval.1_3 =3D foo.strub.0 (&.strub.watermark.2); __builtin___strub_leave (&.strub.watermark.2); .strub.watermark.2 =3D{v} {CLOBBER}; return retval.1_3; ``` Which looks fine but bitintlower is not expecting a gimple ssa of _BitInt(N= ) in the GIMPLE_RETURN . Here is a reduced _GIMPLE testcase without the need for -fstrub=3Dinternal : ``` _BitInt(146) foo1(void); _BitInt(146) __GIMPLE() foo(void)=20 { _BitInt(146) t; t =3D foo1(); return t; } ```=