https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83287
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Reduced testcase that still ICEs, starting with the same revision: void foo (); namespace { void foo (); } template <class, class T> void bar () { new T (foo); } void baz () { bar <double, double> (); }