https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119344
Bug ID: 119344
Summary: internal compiler error related to template parameters
and pointers to member functions
Product: gcc
Version: 14.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ivan.lazaric.gcc at gmail dot com
Target Milestone: ---
Code:
```
struct S {
void fn();
};
using T = decltype(&S::fn);
template<T Ptr> requires(Ptr != T{}) bind_front(){}
void use(){
bind_front<&S::fn>();
}
```
https://godbolt.org/z/fe4f1cPh6
GCC ICEs with output:
```
<source>:8:35: internal compiler error: in build_ptrmemfunc_access_expr, at
cp/typeck.cc:3636
8 | template<T Ptr> requires(Ptr != T{}) bind_front(){}
| ^
0x2031cbc internal_error(char const*, ...)
???:0
0x77895f fancy_abort(char const*, int, char const*)
???:0
0x99874b cp_build_binary_op(op_location_t const&, tree_code, tree_node*,
tree_node*, int)
???:0
0x7a4b0f build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node*, tree_node**, int)
???:0
0x98b432 build_x_binary_op(op_location_t const&, tree_code, tree_node*,
tree_code, tree_node*, tree_code, tree_node*, tree_node**, int)
???:0
0x90ee14 c_parse_file()
???:0
0xa0d1b9 c_common_parse_file()
???:0
```