http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59989
Bug ID: 59989 Summary: ICE when a template parameter pack is explicitly specified for a function template and provides a complete argument list for a template Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: richard-gccbugzilla at metafoo dot co.uk GCC ICEs on this: template<typename T> struct X {}; template<template<typename...> class D, typename ...U> int test(D<U...>*); int n = test<X, int>(0); It looks like what happens is: the pack 'U' is substituted as '{int, U2...}' from the explicit arguments, resulting in int test(X<int, U2...>*) Then, deducing 'X<int, U2...>*' against 'int' fails (as it should). Then, GCC tries to diagnose this, but the type pretty-printer crashes because 'X<int, U2...>' is malformed (because the 'U2...' argument has no corresponding parameter, I assume).