From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BB4F9383F2C2; Fri, 18 Nov 2022 17:03:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB4F9383F2C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668791001; bh=rGihAFdMgZXgltw8ogQqJnUQ/w5o+KaUa37uFGa5zVU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YGlDwl1+LUBYlS4SGXyCD8aC4h7eUKZUtkDFVd50iaP8MV++7cY9lGcWndcpe/u9O k4kD9iRa9zYXk8t4zFh4ydaFM5UsONAaMURRvN2H5WOCNzYDVs+FC3G9cKnlpxVCdT 1bn5Xh97OsIF6j67f9mh55lDXVUhoP/pXNQaRxyw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/107307] [12/13 Regression] ICE tree check: expected class 'type', have 'exceptional' (error_mark) in canonicalize_component_ref, at gimplify.cc:2923 since r12-3278-g823685221de986af Date: Fri, 18 Nov 2022 17:03:20 +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: 13.0 X-Bugzilla-Keywords: error-recovery, ice-checking, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 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=3D107307 --- Comment #4 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:bd0c9d9e706adaeea0d96152daade0a6819a8715 commit r13-4143-gbd0c9d9e706adaeea0d96152daade0a6819a8715 Author: Andrew Pinski Date: Thu Nov 17 22:08:07 2022 +0000 Fix PRs 106764, 106765, and 107307, all ICE after invalid re-declaration The problem here is the gimplifier returns GS_ERROR but in some cases we don't check that soon enough and try to do other work which could crash. So the fix in these two cases is to return GS_ERROR early if the gimplify_* functions had return GS_ERROR. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. Thanks, Andrew Pinski gcc/ChangeLog: PR c/106764 PR c/106765 PR c/107307 * gimplify.cc (gimplify_compound_lval): Return GS_ERROR if gimplify_expr had return GS_ERROR. (gimplify_call_expr): Likewise. gcc/testsuite/ChangeLog: PR c/106764 PR c/106765 PR c/107307 * gcc.dg/redecl-19.c: New test. * gcc.dg/redecl-20.c: New test. * gcc.dg/redecl-21.c: New test.=