https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102097
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2021-08-27 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Here is a C++11 version of the same problem: template<class T> void fun(T&){} template<class T> void fun(T&&){} int main() { void(*ptr)(int&) = &fun; } ICC accepts this one. MSVC accepts both the original and this C++ version.