This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]