https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65396 --- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Another simplified testcase: template<class T> void f(); template<class T=int> void f() {} int main() { f(); }