[Bug c++/62276] New: ICE when non-variadic template template parameter is default argument of variadic template template parameter

juchem at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Aug 26 23:26:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62276

            Bug ID: 62276
           Summary: ICE when non-variadic template template parameter is
                    default argument of variadic template template
                    parameter
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: juchem at gmail dot com

Created attachment 33399
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33399&action=edit
preprocessed source

The code below will result in an internal compiler error on gcc 4.9.0, 4.8.1
and 4.7.3. Tested in Debian sid (aug/2014), http://gcc.godbolt.org/ and
http://ideone.com.

template <typename T> using bar = T;

template <template <typename...> class F = bar>
void foo() {}

int main() { foo(); }

output:
$ g++-4.9 -std=c++11 ice.cpp
ice.cpp: In instantiation of ‘void foo() [with F = bar]’:
ice.cpp:6:18:   required from here
ice.cpp:4:6: internal compiler error: in write_name, at cp/mangle.c:800
 void foo() {}
      ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccKK6fS1.out file, please attach this to
your bugreport.


More information about the Gcc-bugs mailing list