From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 066273842311; Fri, 18 Nov 2022 17:03:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 066273842311 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668791000; bh=gu3CH+qvqkr71uP6DouzQrk9KJjsIhOOIX9vemts6dk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=F7drKwfIn6+SRkLZ/dijck0rnAKRQP2eGXQwTHhq94NL0jj2ch6XzmPzH8RoyOWjU d0y86BABQgKE4q1+X5IR0oiCTe5hwfNSWTKw2SDiqoLIHdDlU//BlmJ4ffKwY7QLyf Tryk4XxTLVJnVwPHSR0j6LVzhr69Nbcm4UwBbeWo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106765] [12/13 Regression] ICE (invalid code) in tree check: expected class 'type', have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc since r12-7222-g3f10e0d50b5e3b3f Date: Fri, 18 Nov 2022 17:03:19 +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: 12.0 X-Bugzilla-Keywords: error-recovery, ice-checking, ice-on-invalid-code X-Bugzilla-Severity: trivial 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=3D106765 --- Comment #2 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.=