public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105186] [9/10/11/12 Regression] ICE in canonicalize_attr_name, at attribs.h:146 Date: Mon, 11 Apr 2022 08:42:18 +0000 [thread overview] Message-ID: <bug-105186-4-tYIeyQz6yT@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105186-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105186 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:083e8e66d2e90992fa83a53bfc3553dfa91abda1 commit r12-8077-g083e8e66d2e90992fa83a53bfc3553dfa91abda1 Author: Jakub Jelinek <jakub@redhat.com> Date: Mon Apr 11 10:41:07 2022 +0200 c-family: Initialize ridpointers for __int128 etc. [PR105186] The following testcase ICEs with C++ and is incorrectly rejected with C. The reason is that both FEs use ridpointers identifiers for CPP_KEYWORD and value or u.value for CPP_NAME e.g. when parsing attributes or OpenMP directives etc., like: /* Save away the identifier that indicates which attribute this is. */ identifier = (token->type == CPP_KEYWORD) /* For keywords, use the canonical spelling, not the parsed identifier. */ ? ridpointers[(int) token->keyword] : id_token->u.value; identifier = canonicalize_attr_name (identifier); I've tried to change those to use ridpointers only if non-NULL and otherwise use the value/u.value even for CPP_KEYWORDS, but that was a large 10 hunks patch. The following patch instead just initializes ridpointers for the __intNN keywords. It can't be done earlier before we record_builtin_type as there are 2 different spellings and if we initialize those ridpointers early, the second record_builtin_type fails miserably. 2022-04-11 Jakub Jelinek <jakub@redhat.com> PR c++/105186 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d and __int%d__ builtin types, initialize corresponding ridpointers entry. * c-c++-common/pr105186.c: New test.
next prev parent reply other threads:[~2022-04-11 8:42 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-06 18:25 [Bug c++/105186] New: " gscfq@t-online.de 2022-04-06 18:36 ` [Bug c++/105186] " mpolacek at gcc dot gnu.org 2022-04-07 13:16 ` [Bug c++/105186] [9/10/11/12 Regression] " jakub at gcc dot gnu.org 2022-04-07 15:29 ` jakub at gcc dot gnu.org 2022-04-11 8:42 ` cvs-commit at gcc dot gnu.org [this message] 2022-04-11 9:04 ` [Bug c++/105186] [9/10/11 " jakub at gcc dot gnu.org 2022-04-13 4:28 ` cvs-commit at gcc dot gnu.org 2022-04-13 5:59 ` [Bug c++/105186] [9/10 " jakub at gcc dot gnu.org 2022-05-10 8:26 ` cvs-commit at gcc dot gnu.org 2022-05-11 6:26 ` cvs-commit at gcc dot gnu.org 2022-05-11 6:36 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105186-4-tYIeyQz6yT@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).