This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77638] New: ICE on x86_64-linux-gnu (internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in cp_parser_template_declaration_after_parameters, at cp/parser.c:25722)
- From: "chengniansun at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 18 Sep 2016 22:45:03 +0000
- Subject: [Bug c++/77638] New: ICE on x86_64-linux-gnu (internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in cp_parser_template_declaration_after_parameters, at cp/parser.c:25722)
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77638
Bug ID: 77638
Summary: ICE on x86_64-linux-gnu (internal compiler error: tree
check: expected tree that contains ‘decl common’
structure, have ‘error_mark’ in
cp_parser_template_declaration_after_parameters, at
cp/parser.c:25722)
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: chengniansun at gmail dot com
Target Milestone: ---
$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160918 (experimental) [trunk revision 240220] (GCC)
$
$ g++-trunk small.C
small.C:2:11: error: ‘CharT’ has not been declared
template <CharT, CharT... String>
^~~~~
small.C:2:18: error: ‘CharT’ has not been declared
template <CharT, CharT... String>
^~~~~
small.C:3:30: error: ‘String’ has not been declared
typename enable_if<sizeof...(String) == 3, int>::type operator"" _script();
^~~~~~
small.C:3:47: error: template argument 1 is invalid
typename enable_if<sizeof...(String) == 3, int>::type operator"" _script();
^
small.C:3:75: internal compiler error: tree check: expected tree that contains
‘decl common’ structure, have ‘error_mark’ in
cp_parser_template_declaration_after_parameters, at cp/parser.c:25722
typename enable_if<sizeof...(String) == 3, int>::type operator"" _script();
^
0x10790d4 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
../../gcc-source-trunk/gcc/tree.c:9914
0x79c2a8 contains_struct_check
../../gcc-source-trunk/gcc/tree.h:3140
0x79c2a8 cp_parser_template_declaration_after_parameters
../../gcc-source-trunk/gcc/cp/parser.c:25722
0x79c7a1 cp_parser_explicit_template_declaration
../../gcc-source-trunk/gcc/cp/parser.c:25902
0x79c7a1 cp_parser_template_declaration_after_export
../../gcc-source-trunk/gcc/cp/parser.c:25920
0x7a3e59 cp_parser_declaration
../../gcc-source-trunk/gcc/cp/parser.c:12209
0x7a28af cp_parser_declaration_seq_opt
../../gcc-source-trunk/gcc/cp/parser.c:12139
0x7a2bf8 cp_parser_translation_unit
../../gcc-source-trunk/gcc/cp/parser.c:4356
0x7a2bf8 c_parse_file()
../../gcc-source-trunk/gcc/cp/parser.c:37714
0x917b92 c_common_parse_file()
../../gcc-source-trunk/gcc/c-family/c-opts.c:1073
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.
$
$ cat small.C
template <bool, typename> struct enable_if;
template <CharT, CharT... String>
typename enable_if<sizeof...(String) == 3, int>::type operator"" _script();