From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6BA623858D20; Sat, 18 May 2024 14:04:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BA623858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716041084; bh=RGjBSPhUt6Zag65ym7lU/Byk1n42MlsONRdNFkcKO40=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Wsmv25DAO1x3LfNH2Og+PoJoUHdR9fHS8qMIT6FWb2cDPcB7flSJzTeNFgw4kNeSD r53N2fsK2fG0Dj3HpqfFk7Gh6udUr9TVypCtpgAYD6BLwqJivHt975JSvcZYGGoWRB qgh+zIvSanwZiU9WgsyVmFZyVSSsspFxkKgdh7v0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/115143] [11/12/13/14/15 Regression] tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:85 Date: Sat, 18 May 2024 14:04:44 +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: ice-on-valid-code X-Bugzilla-Severity: blocker 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: 13.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=3D115143 --- Comment #7 from Andrew Pinski --- here is the simplified gimple testcase so it does not depend on optimizatio= ns before hand: ``` unsigned __GIMPLE (ssa,startwith("phiopt")) foo (unsigned a, unsigned b) { unsigned j; unsigned _23; unsigned _12; __BB(2): if (a_6(D) !=3D 0u) goto __BB3; else goto __BB4; __BB(3): j_10 =3D __PHI (__BB2: b_11(D)); _23 =3D __MIN (a_6(D), j_10); goto __BB4; __BB(4): _12 =3D __PHI (__BB3: _23, __BB2: 0u); return _12; } ``` Here is one which failed since GCC 10 (when __MIN support was added for gim= ple FE): ``` signed __GIMPLE (ssa,startwith("phiopt")) foo (signed a, unsigned b) { signed j; signed _23; signed _12; __BB(2): if (a_6(D) > 0) goto __BB3; else goto __BB4; __BB(3): j_10 =3D __PHI (__BB2: b_11(D)); _23 =3D __MIN (a_6(D), j_10); goto __BB4; __BB(4): _12 =3D __PHI (__BB3: _23, __BB2: 0); return _12; } ```=