From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2049) id 2021C385626C; Thu, 5 May 2022 12:07:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2021C385626C Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Matthew Malcomson To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] Restore some grokdeclarator code X-Act-Checkin: gcc X-Git-Author: Richard Sandiford X-Git-Refname: refs/vendors/ARM/heads/morello X-Git-Oldrev: 0b964be7c94b5784ce5313348051b8205b6f7187 X-Git-Newrev: 2d4829319d27485a96d9935446c47e91ee0fca40 Message-Id: <20220505120727.2021C385626C@sourceware.org> Date: Thu, 5 May 2022 12:07:27 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2022 12:07:27 -0000 https://gcc.gnu.org/g:2d4829319d27485a96d9935446c47e91ee0fca40 commit 2d4829319d27485a96d9935446c47e91ee0fca40 Author: Richard Sandiford Date: Tue Apr 26 15:05:03 2022 +0100 Restore some grokdeclarator code Restore some grokdeclarator code lost in the previous patch. This restores bootstrap and fixes some attribute testsuite regressions. Diff: --- gcc/c/c-decl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 0c6722d95e8..0dfcf5ed4ae 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -7054,6 +7054,10 @@ grokdeclarator (const struct c_declarator *declarator, && deprecated_capability_uses > 1 && !POINTER_TYPE_P (declspecs->type)) error_at (input_location, "use of %<__capability%> is ambiguous"); + + *decl_attrs = chainon (returned_attrs, *decl_attrs); + *decl_attrs = chainon (decl_id_attrs, *decl_attrs); + /* Now TYPE has the actual type, apart from any qualifiers in TYPE_QUALS. */