From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1A6AA396E011; Thu, 30 Apr 2020 19:49:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A6AA396E011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588276148; bh=DV+NpyaH7ibVNodJAsskqKGED9TfHBSyG2kHUiPQKns=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gWV+4+9j11F7ECQMBuTmk5F2SLL3T64DaohypRpIbF8A9PdvVdJuTeH284fQ+zYHC pYWlN/K2oyYwDi3YZRrQh4uLVWNp2U3zVuni/s7iyiktkeQAK+2y2G61jLh6Q0mc3R 7RALqngx3gB4QhFkiBHqEu2dekXILV57I/Ltps3o= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/94842] [8/9/10/11 Regression] internal compiler error: in gimplify_label_expr, at gimplify.c:2573 Date: Thu, 30 Apr 2020 19:49:07 +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: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal 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: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2020 19:49:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94842 --- Comment #6 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:bf9155914f0c2dac62c6abf1e45abb52a5a56e5b commit r11-5-gbf9155914f0c2dac62c6abf1e45abb52a5a56e5b Author: Jakub Jelinek Date: Thu Apr 30 21:48:30 2020 +0200 c: Fix ICE with _Atomic side-effect in nested fn param decls [PR94842] If there are _Atomic side-effects in the parameter declarations of non-nested function, when they are parsed, current_function_decl is NULL, the create_artificial_label created labels during build_atomic* a= re then adjusted by store_parm_decls through set_labels_context_r callback. Unfortunately, if such thing happens in nested function parameter declarations, while those decls are parsed current_function_decl is the parent function (and am not sure it is a good idea to temporarily clear= it, some code perhaps should be aware it is in a nested function, or it can refer to variables from the parent function etc.) and that means store_param_decls through set_labels_context_r doesn't adjust anything. As those labels are emitted in the nested function body rather than in = the parent, I think it is ok to override the context in those cases. 2020-04-30 Jakub Jelinek PR c/94842 * c-decl.c (set_labels_context_r): In addition to context-less LABEL_DECLs adjust also LABEL_DECLs with context equal to parent function if any. (store_parm_decls): Adjust comment. * gcc.dg/pr94842.c: New test.=