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.