This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59989] New: ICE when a template parameter pack is explicitly specified for a function template and provides a complete argument list for a template
- From: "richard-gccbugzilla at metafoo dot co.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Jan 2014 20:06:09 +0000
- Subject: [Bug c++/59989] New: ICE when a template parameter pack is explicitly specified for a function template and provides a complete argument list for a template
- Auto-submitted: auto-generated
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).