This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58581] New: [4.7/4.8/4.9 Regression] [c++11] ICE with no-throw specification in deleted function
- 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: Mon, 30 Sep 2013 19:52:30 +0000
- Subject: [Bug c++/58581] New: [4.7/4.8/4.9 Regression] [c++11] ICE with no-throw specification in deleted function
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58581
Bug ID: 58581
Summary: [4.7/4.8/4.9 Regression] [c++11] ICE with no-throw
specification in deleted function
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 invalid code snippet (compiled with "std=c++0x") triggers an ICE
since GCC 4.7.0:
===========================================================
template<typename T> int foo(T) noexcept(T()) = delete;
int i = foo(0);
===========================================================
bug.cc:3:14: error: use of deleted function 'int foo(T) [with T = int]'
int i = foo(0);
^
bug.cc:1:26: note: declared here
template<typename T> int foo(T) noexcept(T()) = delete;
^
bug.cc:3:14: internal compiler error: in nothrow_spec_p, at cp/except.c:1265
int i = foo(0);
^
0x68b5fa nothrow_spec_p(tree_node const*)
../../gcc/gcc/cp/except.c:1265
0x534afb set_flags_from_callee(tree_node*)
../../gcc/gcc/cp/call.c:327
0x534c79 build_call_a(tree_node*, int, tree_node**)
../../gcc/gcc/cp/call.c:359
0x536856 build_cxx_call(tree_node*, int, tree_node**, int)
../../gcc/gcc/cp/call.c:7168
0x548739 build_over_call
../../gcc/gcc/cp/call.c:7152
0x54a371 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
../../gcc/gcc/cp/call.c:3917
0x6b6c3e finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
../../gcc/gcc/cp/semantics.c:2257
0x643626 cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:6009
0x645f6d cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7009
0x646b4f cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:7701
0x64700f cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:7937
0x647466 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:7987
0x647466 cp_parser_constant_expression
../../gcc/gcc/cp/parser.c:8197
0x65313e cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16520
0x65377f cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:10986
0x6555e0 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10867
0x65e5ee cp_parser_declaration
../../gcc/gcc/cp/parser.c:10764
0x65d35a cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10650
0x65ec36 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:3939
0x65ec36 c_parse_file()
../../gcc/gcc/cp/parser.c:28898
Please submit a full bug report, [etc.]