public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109958] New: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration
@ 2023-05-24 18:45 ed at catmur dot uk
  2023-05-24 18:51 ` [Bug c++/109958] " mpolacek at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: ed at catmur dot uk @ 2023-05-24 18:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109958
           Summary: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking
                    the address of bound static member function brought
                    into derived class by using-declaration
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ed at catmur dot uk
  Target Milestone: ---

struct B { static int f(); };
struct D : B { using B::f; };
void f(D d) { &d.f; }

<source>: In function 'void f(D)':
<source>:3:18: error: ISO C++ forbids taking the address of a bound member
function to form a pointer to member function.  Say '&D::f' [-fpermissive]
    3 | void f(D d) { &d.f; }
      |                ~~^
<source>:3:18: internal compiler error: in build_ptrmem_type, at
cp/decl.cc:11066
    3 | void f(D d) { &d.f; }
      |                  ^
0x23a0cee internal_error(char const*, ...)
        ???:0
0xa95fae fancy_abort(char const*, int, char const*)
        ???:0
0xd31f7f build_x_unary_op(unsigned int, tree_code, cp_expr, tree_node*, int)
        ???:0
0xc7ab2f c_parse_file()
        ???:0
0xdb9519 c_common_parse_file()
        ???:0

This appears to have been broken somewhere between 4.7.4 and 4.8.1.

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

end of thread, other threads:[~2024-06-10 15:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24 18:45 [Bug c++/109958] New: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration ed at catmur dot uk
2023-05-24 18:51 ` [Bug c++/109958] " mpolacek at gcc dot gnu.org
2023-05-24 19:06 ` [Bug c++/109958] [10/11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
2023-05-25  7:57 ` rguenth at gcc dot gnu.org
2023-05-25 10:46 ` ed at catmur dot uk
2023-07-07 10:45 ` [Bug c++/109958] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-05-21 14:59 ` [Bug c++/109958] [11/12/13/14/15 " simartin at gcc dot gnu.org
2024-06-02 15:50 ` cvs-commit at gcc dot gnu.org
2024-06-02 15:54 ` simartin at gcc dot gnu.org
2024-06-10 15:00 ` simartin 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).