From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4129D3864858; Wed, 6 Apr 2022 15:55:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4129D3864858 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104668] [12 Regression] ICE in lookup_attribute_spec, at attribs.cc:425 Date: Wed, 06 Apr 2022 15:55:37 +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: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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, 06 Apr 2022 15:55:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104668 --- Comment #3 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:9fd377a747375a82912bd81c67b275301489785c commit r12-8029-g9fd377a747375a82912bd81c67b275301489785c Author: Jakub Jelinek Date: Wed Apr 6 17:53:41 2022 +0200 c++: Fix up ICE when cplus_decl_attributes is called with error_mark_no= de attributes [PR104668] cplus_decl_attributes can be called with attributes equal to error_mark_node, there are some spots in the function that test it or decl_attributes it calls starts with: if (TREE_TYPE (*node) =3D=3D error_mark_node || attributes =3D=3D error_mark_node) return NULL_TREE; But the recent PR104245 change broke this when processing_template_decl is true. The patch returns early for attributes error_mark_node from cplus_decl_attributes. 2022-04-06 Jakub Jelinek PR c++/104668 * decl2.cc (splice_template_attributes): Return NULL if *p is error_mark_node. (cplus_decl_attributes): Return early if attributes is error_mark_node. Don't check that later. * g++.dg/cpp0x/pr104668.C: New test.=