http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60046
Bug ID: 60046
Summary: internal compiler error: in nothrow_spec_p, at
cp/except.c:1280
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: lukeocamden at gmail dot com
Sorry: no preprocessed source yet.
$ g++ --version
g++ (GCC) 4.9.0 20140202 (experimental)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cat nothrow-ice.cpp
#include <vector>
template <typename T>
struct Container : public std::vector<int>
{
typedef std::vector<int> vec;
void swap(Container& rhs)
{
vec::swap(rhs);
}
};
int main()
{
Container<int> ca;
Container<int> cb;
ca.swap(cb);
return 0;
}
$ g++ -std=c++11 nothrow-ice.cpp
nothrow-ice.cpp: In instantiation of 'void Container<T>::swap(Container<T>&)
[with T = int]':
nothrow-ice.cpp:20:13: required from here
nothrow-ice.cpp:11:18: internal compiler error: in nothrow_spec_p, at
cp/except.c:1280
vec::swap(rhs);
^
0x625335 nothrow_spec_p(tree_node const*)
gcc/cp/except.c:1279
0x56fff8 set_flags_from_callee(tree_node*)
gcc/cp/call.c:330
0x5700c9 build_call_a(tree_node*, int, tree_node**)
gcc/cp/call.c:362
0x5710f2 build_cxx_call(tree_node*, int, tree_node**, int)
gcc/cp/call.c:7241
0x57c4c8 build_over_call
gcc/cp/call.c:7225
0x579a0d build_new_method_call_1
gcc/cp/call.c:7887
0x579a0d build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
gcc/cp/call.c:7957
0x63abf8 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
gcc/cp/semantics.c:2306
0x5a4414 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
gcc/cp/pt.c:14625
0x5a79d8 tsubst_expr
gcc/cp/pt.c:13812
0x5a6bb6 tsubst_expr
gcc/cp/pt.c:13233
0x5a7971 tsubst_expr
gcc/cp/pt.c:13424
0x5a67d2 instantiate_decl(tree_node*, int, bool)
gcc/cp/pt.c:19690
0x5bce7b instantiate_pending_templates(int)
gcc/cp/pt.c:19806
0x5d50cf cp_write_global_declarations()
gcc/cp/decl2.c:4149
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.