From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6CD033951875; Wed, 16 Sep 2020 19:21:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CD033951875 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600284106; bh=UiA5kaBejUQFBP9svh4txbi6Rfzg2crnUOh2rJHKuD4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TyPBcZWfnqNbuUxGvpTW9Y6lCl/J6+4qSdRORV0w3e5YLsdwie8UkVAx/bYWwuuad /crln22TV99/AJlrXrMpZ+NBFQEZPJ3g501SDynJoArJ0/NLI0jaDtJUhfhfuf/Qus n3Ai5RTqoWFPuQ+78GmYQeHdQGi0Xl2o6o9jMB6Q= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/94842] [8/9 Regression] internal compiler error: in gimplify_label_expr, at gimplify.c:2573 Date: Wed, 16 Sep 2020 19:21:46 +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: Wed, 16 Sep 2020 19:21:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94842 --- Comment #11 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:b66139a3ba159473432edabb983c62219a28590d commit r9-8894-gb66139a3ba159473432edabb983c62219a28590d 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. (cherry picked from commit 61fb8963c22d91152a9c46a3512307bef3b3d7f7)=