https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127196
--- Comment #1 from Waffl3x <waffl3x at gcc dot gnu.org> --- https://godbolt.org/z/T76asK9nY ``` template<typename T> bool g(); template<> bool g<int>() { __builtin_printf("Shouldn't happen"); return true; } template<> bool g<const int>() { return true; } template<typename T> void f0(T a) post(g<decltype(a)>()); template<typename T> void f0(T const a) {} template void f0<int>(int); template<typename T> void f1(T const a) post(g<decltype(a)>()) {} template void f1<int>(int); int main() { f1(42); f0(42); } ``` Unfortunately this is not merely a diagnostic issue. I'm working on this.
