https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62134
Bug ID: 62134 Summary: ICE with template alias in c++11 / c++1y mode Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: lloda at bluewin dot ch Created attachment 33318 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33318&action=edit A test case. The problematic section is marked with MAKE_ICE. Somewhat reduced case0.C attached. > $CXX -v Using built-in specs. COLLECT_GCC=/opt/gcc-4.9/bin/g++ COLLECT_LTO_WRAPPER=/mnt/end/opt/gcc-4.9.1/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../../src/gcc-4.9.1/configure --prefix=/opt/gcc-4.9.1 --enable-lto --enable-languages=c,c++,fortran --disable-multilib Thread model: posix gcc version 4.9.1 (GCC) > $CXX case0.C -DMAKE_ICE -std=c++11 case0.C: In substitution of ‘template<class A> using type = PermutationSign<std::tuple<>, R> [with A = std::tuple<>]’: case0.C:100:67: required from ‘const int FindCombination<std::tuple<>, std::tuple<std::tuple<> > >::where’ case0.C:135:27: required from here case0.C:115:58: internal compiler error: in retrieve_specialization, at cp/pt.c:1048 template <class A> using type = PermutationSign<P, A>; ^ 0x55ebb7 retrieve_specialization ../../../src/gcc-4.9.1/gcc/cp/pt.c:1045 0x570136 tsubst_decl ../../../src/gcc-4.9.1/gcc/cp/pt.c:11045 0x568e57 tsubst(tree_node*, tree_node*, int, tree_node*) ../../../src/gcc-4.9.1/gcc/cp/pt.c:11525 0x57160b instantiate_template_1 ../../../src/gcc-4.9.1/gcc/cp/pt.c:15538 0x57160b instantiate_template(tree_node*, tree_node*, int) ../../../src/gcc-4.9.1/gcc/cp/pt.c:15588 0x568f78 instantiate_alias_template ../../../src/gcc-4.9.1/gcc/cp/pt.c:15618 0x568f78 tsubst(tree_node*, tree_node*, int, tree_node*) ../../../src/gcc-4.9.1/gcc/cp/pt.c:11552 0x56cc35 lookup_template_class_1 ../../../src/gcc-4.9.1/gcc/cp/pt.c:7660 0x56cc35 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../../src/gcc-4.9.1/gcc/cp/pt.c:7886 0x569590 tsubst(tree_node*, tree_node*, int, tree_node*) ../../../src/gcc-4.9.1/gcc/cp/pt.c:11781 0x570f65 tsubst_qualified_id ../../../src/gcc-4.9.1/gcc/cp/pt.c:12426 0x5617d1 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../../src/gcc-4.9.1/gcc/cp/pt.c:14411 0x561310 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../../src/gcc-4.9.1/gcc/cp/pt.c:14332 0x565e0f tsubst_expr ../../../src/gcc-4.9.1/gcc/cp/pt.c:14016 0x569a4c tsubst_template_arg ../../../src/gcc-4.9.1/gcc/cp/pt.c:9454 0x56dda2 tsubst_template_args ../../../src/gcc-4.9.1/gcc/cp/pt.c:9993 0x56e2c7 tsubst_aggr_type ../../../src/gcc-4.9.1/gcc/cp/pt.c:10190 0x568725 tsubst(tree_node*, tree_node*, int, tree_node*) ../../../src/gcc-4.9.1/gcc/cp/pt.c:12122 0x56dda2 tsubst_template_args ../../../src/gcc-4.9.1/gcc/cp/pt.c:9993 0x568948 tsubst(tree_node*, tree_node*, int, tree_node*) ../../../src/gcc-4.9.1/gcc/cp/pt.c:11909 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.