https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63214
Bug ID: 63214 Summary: [5.0 regression] ICE with static __thread value member in template class Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kikairoya at gmail dot com following code causes ICE with gcc HEAD 5.0.0 20140908 (experimental) (ran in http://melpon.org/wandbox/permlink/vXZsIogHe6QO5pnI ) ---------------- #include <memory> template <typename T> struct X { static __thread T value_; }; ---------------- prog.cc:5:2: internal compiler error: Segmentation fault }; ^ 0x9a2d3f crash_signal /home/heads/gcc/gcc-source/gcc/toplev.c:339 0x6fdee0 symbol_table::decl_assembler_name_hash(tree_node const*) /home/heads/gcc/gcc-source/gcc/symtab.c:69 0x6fe0e8 symbol_table::insert_to_assembler_name_hash(symtab_node*, bool) /home/heads/gcc/gcc-source/gcc/symtab.c:181 0x6fe1fc symbol_table::symtab_initialize_asm_name_hash() /home/heads/gcc/gcc-source/gcc/symtab.c:263 0x6ff3f4 symbol_table::symtab_initialize_asm_name_hash() /home/heads/gcc/gcc-source/gcc/symtab.c:950 0x6ff3f4 symtab_node::get_for_asmname(tree_node const*) /home/heads/gcc/gcc-source/gcc/symtab.c:939 0x709088 handle_alias_pairs /home/heads/gcc/gcc-source/gcc/cgraphunit.c:1111 0x70c94c symbol_table::finalize_compilation_unit() /home/heads/gcc/gcc-source/gcc/cgraphunit.c:2264 0x5bba2b cp_write_global_declarations() /home/heads/gcc/gcc-source/gcc/cp/decl2.c:4666 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. -----------------