https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91889
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:
void f(int*) { }
void f(const int* const &) { }
void g(int* p) { f(p); }
<source>: In function 'void g(int*)':
<source>:3:21: error: call of overloaded 'f(int*&)' is ambiguous
3 | void g(int* p) { f(p); }
| ^
<source>:1:6: note: candidate: 'void f(int*)'
1 | void f(int*) { }
| ^
<source>:2:6: note: candidate: 'void f(const int* const&)'
2 | void f(const int* const &) { }
| ^
Compiler returned: 1