https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84092
Bug ID: 84092 Summary: ICE on C++14 code with variable template: in build_qualified_name, at cp/tree.c:2043 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu Target Milestone: --- This appears to be a recent regression. $ g++tk -v Using built-in specs. COLLECT_GCC=g++tk COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/8.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap Thread model: posix gcc version 8.0.1 20180129 (experimental) [trunk revision 257134] (GCC) $ $ g++-7.2.0 -c tmp.cpp $ $ g++tk -c tmp.cpp tmp.cpp:1:44: internal compiler error: in build_qualified_name, at cp/tree.c:2043 template < typename T > int a (T::template b); ^ 0x8dffb4 build_qualified_name(tree_node*, tree_node*, tree_node*, bool) ../../gcc-source-trunk/gcc/cp/tree.c:2043 0x8c9631 finish_qualified_id_expr(tree_node*, tree_node*, bool, bool, bool, bool, int) ../../gcc-source-trunk/gcc/cp/semantics.c:2074 0x8ca073 finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*, bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int) ../../gcc-source-trunk/gcc/cp/semantics.c:3704 0x80b102 cp_parser_primary_expression ../../gcc-source-trunk/gcc/cp/parser.c:5615 0x8183a3 cp_parser_postfix_expression ../../gcc-source-trunk/gcc/cp/parser.c:7029 0x82180c cp_parser_unary_expression ../../gcc-source-trunk/gcc/cp/parser.c:8281 0x7fb7c9 cp_parser_cast_expression ../../gcc-source-trunk/gcc/cp/parser.c:9049 0x7fbec5 cp_parser_binary_expression ../../gcc-source-trunk/gcc/cp/parser.c:9151 0x7fc7b0 cp_parser_assignment_expression ../../gcc-source-trunk/gcc/cp/parser.c:9439 0x7fd7a3 cp_parser_constant_expression ../../gcc-source-trunk/gcc/cp/parser.c:9721 0x7ffb9a cp_parser_parenthesized_expression_list ../../gcc-source-trunk/gcc/cp/parser.c:7718 0x800c7c cp_parser_initializer ../../gcc-source-trunk/gcc/cp/parser.c:21798 0x823744 cp_parser_init_declarator ../../gcc-source-trunk/gcc/cp/parser.c:19611 0x8240c1 cp_parser_single_declaration ../../gcc-source-trunk/gcc/cp/parser.c:27111 0x8241fc cp_parser_template_declaration_after_parameters ../../gcc-source-trunk/gcc/cp/parser.c:26710 0x824b23 cp_parser_explicit_template_declaration ../../gcc-source-trunk/gcc/cp/parser.c:26944 0x824b23 cp_parser_template_declaration_after_export ../../gcc-source-trunk/gcc/cp/parser.c:26962 0x8318f9 cp_parser_declaration ../../gcc-source-trunk/gcc/cp/parser.c:12673 0x830424 cp_parser_declaration_seq_opt ../../gcc-source-trunk/gcc/cp/parser.c:12600 0x830767 cp_parser_translation_unit ../../gcc-source-trunk/gcc/cp/parser.c:4559 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. $ ------------------------------------------------- template < typename T > int a (T::template b);