From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E33CD384230D; Fri, 18 Nov 2022 17:03:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E33CD384230D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668790999; bh=Yci0fxg0e5kG7l0K+ICc/tErlGjVkUcb9/Vu5dEpaSE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fXfWrnm79RQD+bzubAWkbR9v0+NT1KZgfr/1Tc5DapNm4ojbBCP/DxAoTt3z1bd+2 mBCgqjRxLFYKRgfEFidPuFC4y2eGsPCAnGXWMdCj+47C7Dmtg9Sc/6xUt7BBOaf0hi gezqaiKBcqClA2738UQESOM2y5EntN9T4zeJB/no= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106764] [12/13 Regression] ICE on invalid code in tree check: expected function_type or method_type, have error_mark in gimplify_call_expr, at gimplify.cc 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: P3 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=3D106764 --- Comment #5 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.=