http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57947
Bug ID: 57947 Summary: internal compiler error: Segmentation fault using extended initializer lists without -std=c++11 or -std=gnu++11 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cas43 at cs dot stanford.edu Program: template <class _E> class initializer_list {}; template <int N> struct D {D(std::initializer_list<int>) {}}; D<0> d{1, 2, 3}; Compile like this: g++ prog.cpp Output: prog.cpp:8:12: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default] D<0> d{ ^ prog.cpp:9:11: error: in C++98 ‘std::d’ must be initialized by constructor, not by ‘{...}’ 1, 2, 3}; ^ prog.cpp:9:11: internal compiler error: Segmentation fault 0xaac4cf crash_signal ../../s-4.9/gcc/toplev.c:333 0x519ce3 contains_struct_check ../../s-4.9/gcc/tree.h:3803 0x519ce3 convert_like_real ../../s-4.9/gcc/cp/call.c:6055 0x51b671 build_over_call ../../s-4.9/gcc/cp/call.c:6943 0x517b3b build_new_method_call_1 ../../s-4.9/gcc/cp/call.c:7777 0x517b3b build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, tree_node**, int) ../../s-4.9/gcc/cp/call.c:7847 0x518d12 build_special_member_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, int) ../../s-4.9/gcc/cp/call.c:7412 0x6657d7 expand_default_init ../../s-4.9/gcc/cp/init.c:1664 0x6657d7 expand_aggr_init_1 ../../s-4.9/gcc/cp/init.c:1765 0x66835a build_aggr_init(tree_node*, tree_node*, int, int) ../../s-4.9/gcc/cp/init.c:1516 0x52d01d build_aggr_init_full_exprs ../../s-4.9/gcc/cp/decl.c:5545 0x52d01d check_initializer ../../s-4.9/gcc/cp/decl.c:5680 0x54006d cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../s-4.9/gcc/cp/decl.c:6349 0x6260fd cp_parser_init_declarator ../../s-4.9/gcc/cp/parser.c:16527 0x62673e cp_parser_simple_declaration ../../s-4.9/gcc/cp/parser.c:10946 0x6285a0 cp_parser_block_declaration ../../s-4.9/gcc/cp/parser.c:10827 0x63160b cp_parser_declaration ../../s-4.9/gcc/cp/parser.c:10724 0x6302dd cp_parser_declaration_seq_opt ../../s-4.9/gcc/cp/parser.c:10610 0x6304f0 cp_parser_namespace_body ../../s-4.9/gcc/cp/parser.c:15530 0x6304f0 cp_parser_namespace_definition ../../s-4.9/gcc/cp/parser.c:15511 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. Version: Using built-in specs. COLLECT_GCC=/home/craig/new-gcc/i-4.9/bin/g++ COLLECT_LTO_WRAPPER=/home/craig/new-gcc/i-4.9/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../s-4.9/configure --prefix=/home/craig/new-gcc/i-4.9 Thread model: posix gcc version 4.9.0 20130718 (experimental) (GCC)