http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58516

            Bug ID: 58516
           Summary: ICE with __transaction_atomic
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following code snippet (compiled with "-std=c++0x -fgnu-tm") triggers an
ICE since GCC 4.7.0 (when transactional memory was introduced):

=================================================
void foo()
{
  __transaction_atomic noexcept(false) {}
}
=================================================

bug.cc: In function 'void foo()':
bug.cc:3:41: internal compiler error: tree check: expected class 'expression',
have 'exceptional' (statement_list) in finish_transaction_stmt, at
cp/semantics.c:5202
   __transaction_atomic noexcept(false) {}
                                         ^
0xcd2399 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/gcc/tree.c:9258
0x6b576b expr_check
        ../../gcc/gcc/tree.h:2773
0x6b576b finish_transaction_stmt(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/semantics.c:5202
0x635842 cp_parser_transaction
        ../../gcc/gcc/cp/parser.c:28482
0x635842 cp_parser_statement
        ../../gcc/gcc/cp/parser.c:9205
0x636dde cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:9552
0x636f26 cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:9506
0x648323 cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:18313
0x648323 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:18349
0x64935f cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:22333
0x64a079 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/gcc/cp/parser.c:22254
0x64a079 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16348
0x64a32f cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:10986
0x64c190 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:10867
0x6551ae cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10764
0x653f0d cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10650
0x6557e6 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:3939
0x6557e6 c_parse_file()
        ../../gcc/gcc/cp/parser.c:28893
0x768164 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]

Reply via email to