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++/114889] [modules] ICE in friend_accessible_p with imported class template specialization befriending class template Date: Tue, 07 May 2024 14:49:17 +0000 [thread overview] Message-ID: <bug-114889-4-KhsxZV8HGf@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114889-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114889 --- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:390bd23fd9c98dc40856beef05364f5d1c7b9d04 commit r14-10176-g390bd23fd9c98dc40856beef05364f5d1c7b9d04 Author: Patrick Palka <ppalka@redhat.com> Date: Mon Apr 29 21:27:59 2024 -0400 c++/modules: imported spec befriending class tmpl [PR114889] When adding to CLASSTYPE_BEFRIENDING_CLASSES as part of installing an imported class definition, we need to look through TEMPLATE_DECL like make_friend_class does. Otherwise in the below testcase we won't add _Hashtable<int, int> to CLASSTYPE_BEFRIENDING_CLASSES of _Map_base, which leads to a bogus access check failure for _M_hash_code. PR c++/114889 gcc/cp/ChangeLog: * module.cc (trees_in::read_class_def): Look through TEMPLATE_DECL when adding to CLASSTYPE_BEFRIENDING_CLASSES. gcc/testsuite/ChangeLog: * g++.dg/modules/friend-8_a.H: New test. * g++.dg/modules/friend-8_b.C: New test. Reviewed-by: Jason Merrill <jason@redhat.com> (cherry picked from commit 22b20ac6c6aead2d3f36c413a77dd0b80adfec39)
next prev parent reply other threads:[~2024-05-07 14:49 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-29 13:15 [Bug c++/114889] New: " ppalka at gcc dot gnu.org 2024-04-29 13:17 ` [Bug c++/114889] " ppalka at gcc dot gnu.org 2024-04-30 1:28 ` cvs-commit at gcc dot gnu.org 2024-04-30 1:29 ` ppalka at gcc dot gnu.org 2024-05-07 14:49 ` cvs-commit at gcc dot gnu.org [this message] 2024-05-07 14:49 ` ppalka 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-114889-4-KhsxZV8HGf@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).