This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58635] New: [c++11] ICE with __transaction_atomic and noexcept(false)
- From: "reichelt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 05 Oct 2013 21:20:26 +0000
- Subject: [Bug c++/58635] New: [c++11] ICE with __transaction_atomic and noexcept(false)
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58635
Bug ID: 58635
Summary: [c++11] ICE with __transaction_atomic and
noexcept(false)
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 three code snippets (compiled with "-std=c++0x -fgnu-tm")
trigger slightly different ICEs in build_transaction_expr since GCC 4.7.0.
The first two snippets are valid, the last one is invalid:
===========================================================
int foo()
{
return __transaction_atomic noexcept(false) (false);
}
===========================================================
bug.cc: In function 'int foo()':
bug.cc:3:53: internal compiler error: tree check: expected class 'expression',
have 'constant' (integer_cst) in build_transaction_expr, at cp/semantics.c:5224
return __transaction_atomic noexcept(false) (false);
^
0xcd8c59 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/gcc/tree.c:9227
0x6bcf7a expr_check
../../gcc/gcc/tree.h:2778
0x6bcf7a build_transaction_expr(unsigned int, tree_node*, int, tree_node*)
../../gcc/gcc/cp/semantics.c:5224
0x6443e9 cp_parser_transaction_expression
../../gcc/gcc/cp/parser.c:28568
0x6443e9 cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:6845
0x644cff cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:7701
0x6451bf cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:7937
0x647023 cp_parser_expression
../../gcc/gcc/cp/parser.c:8099
0x63dbf2 cp_parser_expression
../../gcc/gcc/cp/parser.c:8138
0x63dbf2 cp_parser_jump_statement
../../gcc/gcc/cp/parser.c:10472
0x63dbf2 cp_parser_statement
../../gcc/gcc/cp/parser.c:9182
0x63e452 cp_parser_statement_seq_opt
../../gcc/gcc/cp/parser.c:9552
0x63e596 cp_parser_compound_statement
../../gcc/gcc/cp/parser.c:9506
0x64f95b cp_parser_function_body
../../gcc/gcc/cp/parser.c:18328
0x64f95b cp_parser_ctor_initializer_opt_and_function_body
../../gcc/gcc/cp/parser.c:18364
0x6509af cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:22351
0x6516d5 cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/gcc/cp/parser.c:22272
0x6516d5 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16357
0x65198f cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:10995
0x653810 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10876
Please submit a full bug report, [etc.]
===========================================================
int foo(int i)
{
return __transaction_atomic noexcept(false) (i);
}
===========================================================
bug.cc: In function 'int foo(int)':
bug.cc:3:49: internal compiler error: tree check: expected class 'expression',
have 'declaration' (parm_decl) in build_transaction_expr, at
cp/semantics.c:5224
return __transaction_atomic noexcept(false) (i);
^
0xcd8c59 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/gcc/tree.c:9227
[etc.]
===========================================================
int foo()
{
return __transaction_atomic noexcept(false) (x);
}
===========================================================
bug.cc: In function 'int foo()':
bug.cc:3:48: error: 'x' was not declared in this scope
return __transaction_atomic noexcept(false) (x);
^
bug.cc:3:49: internal compiler error: tree check: expected class 'expression',
have 'exceptional' (error_mark) in build_transaction_expr, at
cp/semantics.c:5224
return __transaction_atomic noexcept(false) (x);
^
0xcd8c59 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/gcc/tree.c:9227
[etc.]