https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116366
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think this is just a diagnostic error.
clang produces:
```
<source>:17:28: error: address of overloaded function 'set_mem' does not match
required type 'void (int &)'
17 | static constexpr auto p = &test::set_mem<&test::x>;
| ^~~~~~~~~~~~~~~~~~~~~~~
<source>:11:7: note: candidate template ignored: cannot deduce a type for 'T'
that would make 'const T' equal 'int'
11 | void set_mem(const T& v)
| ^
```