This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/64984] New: [5 Regression] ICE in check_noexcept_t with ubsan
- From: "larsbj at gullik dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 09 Feb 2015 15:49:12 +0000
- Subject: [Bug sanitizer/64984] New: [5 Regression] ICE in check_noexcept_t with ubsan
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64984
Bug ID: 64984
Summary: [5 Regression] ICE in check_noexcept_t with ubsan
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: larsbj at gullik dot net
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
With this test program I get an ICE.
----------
#include <map>
class Type
{
public:
Type();
virtual ~Type();
bool operator<(const Type &) const;
};
int main()
{
std::map<Type, int> map;
map[Type()] = 0;
}
------------
g++ --version
g++ (GCC) 5.0.0 20150203 (experimental)
g++ -fsanitize=undefined -std=gnu++11 -c test.cpp
In file included from /opt/gcc/gcc-trunk/include/c++/5.0.0/bits/move.h:57:0,
from /opt/gcc/gcc-trunk/include/c++/5.0.0/bits/stl_pair.h:59,
from
/opt/gcc/gcc-trunk/include/c++/5.0.0/bits/stl_algobase.h:64,
from /opt/gcc/gcc-trunk/include/c++/5.0.0/bits/stl_tree.h:63,
from /opt/gcc/gcc-trunk/include/c++/5.0.0/map:60,
from test.cpp:1:
/opt/gcc/gcc-trunk/include/c++/5.0.0/type_traits: In instantiation of âstruct
std::__is_nt_constructible_impl<Type&&, Type&&>â:
/opt/gcc/gcc-trunk/include/c++/5.0.0/type_traits:137:12: required from
âstruct std::__and_<std::is_constructible<Type&&, Type&&>,
std::__is_nt_constructible_impl<Type&&, Type&&> >â
/opt/gcc/gcc-trunk/include/c++/5.0.0/type_traits:1174:12: required from
âstruct std::is_nothrow_constructible<Type&&, Type&&>â
/opt/gcc/gcc-trunk/include/c++/5.0.0/type_traits:1205:12: required from
âstruct std::__is_nothrow_move_constructible_impl<Type&&, true>â
/opt/gcc/gcc-trunk/include/c++/5.0.0/type_traits:1211:12: required from
âstruct std::is_nothrow_move_constructible<Type&&>â
/opt/gcc/gcc-trunk/include/c++/5.0.0/tuple:367:7: required from âconstexpr
std::_Tuple_impl<_Idx, _Head>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head>&&)
[with long unsigned int _Idx = 0ul; _Head = Type&&]â
/opt/gcc/gcc-trunk/include/c++/5.0.0/tuple:976:70: required from
âstd::tuple<_Elements&& ...> std::forward_as_tuple(_Elements&& ...) [with
_Elements = {Type}]â
/opt/gcc/gcc-trunk/include/c++/5.0.0/bits/stl_map.h:500:27: required from
âstd::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp,
_Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare,
_Alloc>::key_type&&) [with _Key = Type; _Tp = int; _Compare = std::less<Type>;
_Alloc = std::allocator<std::pair<const Type, int> >; std::map<_Key, _Tp,
_Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare,
_Alloc>::key_type = Type]â
test.cpp:15:15: required from here
/opt/gcc/gcc-trunk/include/c++/5.0.0/type_traits:1162:12: internal compiler
error: Segmentation fault
struct __is_nt_constructible_impl<_Tp, _Arg>
^
0xa89c7f crash_signal
../../gcc/gcc/toplev.c:383
0x69ea1b check_noexcept_r
../../gcc/gcc/cp/except.c:1162
0xc6b254 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, default_hashset_traits>*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set<tree_node*, default_hashset_traits>*))
../../gcc/gcc/tree.c:11086
0xc6b438 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, default_hashset_traits>*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set<tree_node*, default_hashset_traits>*))
../../gcc/gcc/tree.c:11390
0xc6ca18 walk_tree_without_duplicates_1(tree_node**, tree_node*
(*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*,
tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*,
default_hashset_traits>*))
../../gcc/gcc/tree.c:11416
0x69e7cf expr_noexcept_p(tree_node*, int)
../../gcc/gcc/cp/except.c:1255
0x69e922 finish_noexcept_expr(tree_node*, int)
../../gcc/gcc/cp/except.c:1240
0x61e2ee tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:14880
0x61b6ab tsubst_expr
../../gcc/gcc/cp/pt.c:14383
0x61c63c tsubst_template_arg
../../gcc/gcc/cp/pt.c:9692
0x626839 tsubst_template_args
../../gcc/gcc/cp/pt.c:10242
0x623544 tsubst_aggr_type
../../gcc/gcc/cp/pt.c:10439
0x617771 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:11894
0x631c69 instantiate_class_template_1
../../gcc/gcc/cp/pt.c:9260
0x631c69 instantiate_class_template(tree_node*)
../../gcc/gcc/cp/pt.c:9673
0x68aa5d complete_type(tree_node*)
../../gcc/gcc/cp/typeck.c:146
0x68aaff complete_type_or_maybe_complain(tree_node*, tree_node*, int)
../../gcc/gcc/cp/typeck.c:158
0x608d09 xref_basetypes(tree_node*, tree_node*)
../../gcc/gcc/cp/decl.c:12493
0x63116e instantiate_class_template_1
../../gcc/gcc/cp/pt.c:9279
0x63116e instantiate_class_template(tree_node*)
../../gcc/gcc/cp/pt.c:9673