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

            Bug ID: 78344
           Summary: ice on invalid c++ code on x86_64-linux-gnu (internal
                    compiler error: tree check: expected tree_list, have
                    error_mark in cp_check_const_attributes, at
                    cp/decl2.c:1347)
           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: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-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 20161110 (experimental) [trunk revision 242039] (GCC) 
$ 
$ gcc-trunk small.C
small.C:1:30: error: expected ‘(’ before ‘;’ token
 alignas(double) int f alignas;
                              ^
small.C:1:30: error: expected ‘(’ before ‘;’ token
small.C:1:30: internal compiler error: tree check: expected tree_list, have
error_mark in cp_check_const_attributes, at cp/decl2.c:1347
0x1090dcc tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc-source-trunk/gcc/tree.c:9763
0x76fe2e tree_check
        ../../gcc-source-trunk/gcc/tree.h:3045
0x76fe2e cp_check_const_attributes
        ../../gcc-source-trunk/gcc/cp/decl2.c:1347
0x76fe2e cplus_decl_attributes(tree_node**, tree_node*, int)
        ../../gcc-source-trunk/gcc/cp/decl2.c:1421
0x6b9d7d start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        ../../gcc-source-trunk/gcc/cp/decl.c:4961
0x7c0728 cp_parser_init_declarator
        ../../gcc-source-trunk/gcc/cp/parser.c:18939
0x7c12d9 cp_parser_simple_declaration
        ../../gcc-source-trunk/gcc/cp/parser.c:12656
0x7c1611 cp_parser_block_declaration
        ../../gcc-source-trunk/gcc/cp/parser.c:12524
0x7c86d0 cp_parser_declaration
        ../../gcc-source-trunk/gcc/cp/parser.c:12421
0x7c8ad4 cp_parser_declaration_seq_opt
        ../../gcc-source-trunk/gcc/cp/parser.c:12297
0x7c8e18 cp_parser_translation_unit
        ../../gcc-source-trunk/gcc/cp/parser.c:4360
0x7c8e18 c_parse_file()
        ../../gcc-source-trunk/gcc/cp/parser.c:37988
0x92e852 c_common_parse_file()
        ../../gcc-source-trunk/gcc/c-family/c-opts.c:1086
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
alignas(double) int f alignas;
$ 
$

Reply via email to