From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3E439388C03A; Mon, 1 Feb 2021 15:21:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E439388C03A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98355] [9/10/11 Regression] ICE in has_attribute, at c-family/c-attribs.c:5628 Date: Mon, 01 Feb 2021 15:21:43 +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: 11.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: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 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: Mon, 01 Feb 2021 15:21:43 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98355 --- Comment #6 from CVS Commits --- The master branch has been updated by Marek Polacek : https://gcc.gnu.org/g:bab669f2fc643cb1673aecd177eec1c773e9e48e commit r11-7012-gbab669f2fc643cb1673aecd177eec1c773e9e48e Author: Marek Polacek Date: Fri Jan 29 11:29:25 2021 -0500 c++: Improve sorry for __builtin_has_attribute [PR98355] __builtin_has_attribute doesn't work in templates yet (bug 92104), so in r11-471 I added a sorry. But that only caught type-dependent expressions and we also want to sorry on value-dependent expressions. This patch uses uses_template_parms, but guarded with p_t_d, because u_t_p sets p_t_d and then v_d_e_p considers variables with reference types value-dependent, which breaks builtin-has-attribute-6.c. This is a regression and I also plan to apply this to gcc-10. gcc/cp/ChangeLog: PR c++/98355 * parser.c (cp_parser_has_attribute_expression): Use uses_template_parms instead of type_dependent_expression_p. gcc/testsuite/ChangeLog: PR c++/98355 * g++.dg/ext/builtin-has-attribute2.C: New test.=