https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119316
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> --- We can see this without constraints in this adjusted testcase: template <unsigned> struct A { }; template<typename T> auto foo(unsigned n) -> A<sizeof(new T[n])> { return {}; } int main() { foo<int>(5); } The regression for the original testcase happened because mangling requirements exposed this issue more.