public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114889] New: [modules] ICE in friend_accessible_p with imported class template specialization befriending class template
@ 2024-04-29 13:15 ppalka at gcc dot gnu.org
  2024-04-29 13:17 ` [Bug c++/114889] " ppalka at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-04-29 13:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114889

            Bug ID: 114889
           Summary: [modules] ICE in friend_accessible_p with imported
                    class template specialization befriending class
                    template
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

$ cat testcase_a.C
export module mymod;

template <typename, typename>
struct _Hashtable;

export
template <typename _Key, typename _Val>
struct _Map_base {
  void f() {
    _Hashtable<_Key, _Val> __h;
    __h._M_hash_code(0);
  }
};

template <typename _Key, typename _Value>
struct _Hashtable {
  template <typename, typename> friend struct _Map_base;
protected:
  void _M_hash_code(int);
};

_Hashtable<int, int> m;

$ cat testcase_b.C
import mymod;

int main() {
  _Map_base<int, int> m;
  m.f();
}

$ g++ -fmodules-ts testcase_*
In module mymod, imported at testcase_b.C:1:
testcase_a.C: In instantiation of ‘void _Map_base@mymod<_Key, _Val>::f() [with
_Key = int; _Val = int]’:
testcase_b.C:5:6:   required from here
    5 |   m.f();
      |   ~~~^~
testcase_a.C:11:21: internal compiler error: in friend_accessible_p, at
cp/search.cc:803
   11 |     __h._M_hash_code(0);
      |     ~~~~~~~~~~~~~~~~^~~

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-07 14:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-29 13:15 [Bug c++/114889] New: [modules] ICE in friend_accessible_p with imported class template specialization befriending class template 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
2024-05-07 14:49 ` ppalka at gcc dot gnu.org

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).