https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66149
Bug ID: 66149 Summary: ICE: tree check: expected field_decl, have template_decl in int_bit_position, at tree.h:5012 with -std=c++14 -gstabs Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Created attachment 35542 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35542&action=edit reduced testcase Compiler output: $ gcc -std=c++14 -gstabs testcase.C testcase.C:1:8: internal compiler error: tree check: expected field_decl, have template_decl in int_bit_position, at tree.h:5012 struct A ^ 0x107683c tree_check_failed(tree_node const*, char const*, int, char const*, ...) /mnt/svn/gcc-5/gcc/tree.c:9297 0xa0bde9 tree_check(tree_node const*, char const*, int, char const*, tree_code) /mnt/svn/gcc-5/gcc/tree.h:3102 0xa0bde9 int_bit_position(tree_node const*) /mnt/svn/gcc-5/gcc/tree.h:5012 0xa04a0f dbxout_type_fields /mnt/svn/gcc-5/gcc/dbxout.c:1544 0xa04a0f dbxout_type /mnt/svn/gcc-5/gcc/dbxout.c:2221 0xa08af2 dbxout_symbol(tree_node*, int) /mnt/svn/gcc-5/gcc/dbxout.c:2793 0xd1a0c2 rest_of_type_compilation(tree_node*, int) /mnt/svn/gcc-5/gcc/passes.c:309 0x79b854 finish_struct_1(tree_node*) /mnt/svn/gcc-5/gcc/cp/class.c:6714 0x79cf94 finish_struct(tree_node*, tree_node*) /mnt/svn/gcc-5/gcc/cp/class.c:6879 0x7d743d cp_parser_class_specifier_1 /mnt/svn/gcc-5/gcc/cp/parser.c:19855 0x7d743d cp_parser_class_specifier /mnt/svn/gcc-5/gcc/cp/parser.c:20083 0x7d743d cp_parser_type_specifier /mnt/svn/gcc-5/gcc/cp/parser.c:14726 0x7eaeef cp_parser_decl_specifier_seq /mnt/svn/gcc-5/gcc/cp/parser.c:11957 0x7fc121 cp_parser_simple_declaration /mnt/svn/gcc-5/gcc/cp/parser.c:11534 0x7f5d83 cp_parser_block_declaration /mnt/svn/gcc-5/gcc/cp/parser.c:11481 0x7ffc29 cp_parser_declaration /mnt/svn/gcc-5/gcc/cp/parser.c:11378 0x7fe2ba cp_parser_declaration_seq_opt /mnt/svn/gcc-5/gcc/cp/parser.c:11264 0x7fe5cf cp_parser_translation_unit /mnt/svn/gcc-5/gcc/cp/parser.c:4100 0x7fe5cf c_parse_file() /mnt/svn/gcc-5/gcc/cp/parser.c:33192 0x935952 c_common_parse_file() /mnt/svn/gcc-5/gcc/c-family/c-opts.c:1057 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. Tested revisions: r223190 - ICE 5 r222437 - ICE