[Bug c++/72752] [6 Regression] ICE: in retrieve_specialization, at cp/pt.c:1183

benni.buch at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Sep 11 15:21:00 GMT 2017


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

Benjamin Buch <benni.buch at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |benni.buch at gmail dot com

--- Comment #11 from Benjamin Buch <benni.buch at gmail dot com> ---
template< typename >
struct Outer
{
  template< typename >
  struct Inner;
};

template<>
template< typename _T_ >
class Outer< _T_ >::Inner< _T_ >
{};

template struct Outer< int >::Inner< int >;


This test case still fails in Trunk:

$ g++ gcc-test.cpp                                                              
gcc-test.cpp:10:21: internal compiler error: in retrieve_specialization, at
cp/pt.c:1189
 class Outer< _T_ >::Inner< _T_ >
                     ^~~~~~~~~~~~
0x63457f retrieve_specialization
        ../../gcc/gcc/cp/pt.c:1186
0xa6445e tsubst_template_decl
        ../../gcc/gcc/cp/pt.c:12477
0xa5fe7e tsubst_decl
        ../../gcc/gcc/cp/pt.c:12646
0xa5a097 tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:13538
0xa4edad most_specialized_partial_spec
        ../../gcc/gcc/cp/pt.c:22160
0xa77278 instantiate_class_template_1
        ../../gcc/gcc/cp/pt.c:10330
0xa77278 instantiate_class_template(tree_node*)
        ../../gcc/gcc/cp/pt.c:10898
0xabc5ad complete_type(tree_node*)
        ../../gcc/gcc/cp/typeck.c:136
0xa72c0e do_type_instantiation(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/pt.c:22425
0xa280fb cp_parser_explicit_instantiation
        ../../gcc/gcc/cp/parser.c:16430
0xa2f181 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:12655
0xa2f56b cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:12579
0xa2f89a cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4387
0xa2f89a c_parse_file()
        ../../gcc/gcc/cp/parser.c:38799
0xb29786 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1106
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ g++ --version
g++ (GCC) 8.0.0 20170911 (experimental)


More information about the Gcc-bugs mailing list