[Bug c++/66515] [5/6 Regression] g++ segfaults when creating an std::initializer_list
trippels at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 11 17:06:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66515
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-06-11
CC| |trippels at gcc dot gnu.org
Known to work| |4.8.4, 4.9.2
Summary|g++ segfaults when creating |[5/6 Regression] g++
|an std::initializer_list |segfaults when creating an
| |std::initializer_list
Ever confirmed|0 |1
Known to fail| |5.0, 6.0
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 tmp % cat bug_gcc.ii
namespace std
{
template <class _E> class initializer_list
{
const _E *_M_array;
unsigned long _M_len;
};
}
struct type_t
{
};
type_t &
get ()
{
std::initializer_list<type_t>{ { get () } };
}
markus@x4 tmp % g++ -std=c++11 bug_gcc.ii
bug_gcc.ii: In function ‘type_t& get()’:
bug_gcc.ii:16:45: internal compiler error: tree check: expected constructor,
have indirect_ref in build_aggr_conv, at cp/call.c:946
std::initializer_list<type_t>{ { get () } };
^
0xf3f0bc tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9379
0x5cd1bf tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/gcc/tree.h:2858
0x5cd1bf build_aggr_conv
../../gcc/gcc/cp/call.c:946
0x5cd1bf implicit_conversion
../../gcc/gcc/cp/call.c:1856
0x5cccf9 build_list_conv
../../gcc/gcc/cp/call.c:829
0x5cccf9 implicit_conversion
../../gcc/gcc/cp/call.c:1807
0x5cd97e reference_binding
../../gcc/gcc/cp/call.c:1532
0x5cc504 implicit_conversion
../../gcc/gcc/cp/call.c:1797
0x5ce8e2 add_function_candidate
../../gcc/gcc/cp/call.c:2106
0x5cfde7 add_candidates
../../gcc/gcc/cp/call.c:5283
0x5d0124 add_list_candidates
../../gcc/gcc/cp/call.c:3546
0x5d0ff3 build_new_method_call_1
../../gcc/gcc/cp/call.c:8111
0x5d0ff3 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
../../gcc/gcc/cp/call.c:8313
0x5d1cc9 build_special_member_call(tree_node*, tree_node*, vec<tree_node*,
va_gc, vl_embed>**, tree_node*, int, int)
../../gcc/gcc/cp/call.c:7853
0x5d47c3 perform_direct_initialization_if_possible(tree_node*, tree_node*,
bool, int)
../../gcc/gcc/cp/call.c:9506
0x723c87 build_static_cast_1
../../gcc/gcc/cp/typeck.c:6576
0x725037 cp_build_c_cast(tree_node*, tree_node*, int)
../../gcc/gcc/cp/typeck.c:7256
0x67798a build_functional_cast(tree_node*, tree_node*, int)
../../gcc/gcc/cp/typeck2.c:1980
0x755aa9 finish_compound_literal(tree_node*, tree_node*, int)
../../gcc/gcc/cp/semantics.c:2614
0x6e0b21 cp_parser_functional_cast
../../gcc/gcc/cp/parser.c:23914
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.
More information about the Gcc-bugs
mailing list