https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61566
Bug ID: 61566
Summary: [4.9/4.10 Regression] ICE in write_unscoped_name
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppluzhnikov at google dot com
Created attachment 32977
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32977&action=edit
test case
Google ref: b/15734838
Test case compiles fine with Clang and current gcc-4_8-branch (@r211826).
Broken on trunk (and gcc-4_9) since not later than r195189.
Using current trunk @r211826:
gcc-svn-install/bin/g++ -c -std=c++11 t.cc
t.cc: In instantiation of 'std::function<_Res(_ArgTypes
...)>::function(_Functor) [with _Functor = C<>::<lambda()><H, int>;
<template-parameter-2-2> = int; _Res = std::A; _ArgTypes = {}]':
t.cc:24:7: internal compiler error: in write_unscoped_name, at cp/mangle.c:881
function (_Functor);
^
0x727aa1 write_unscoped_name
../../gcc/cp/mangle.c:879
0x72b205 write_unscoped_template_name
../../gcc/cp/mangle.c:897
0x72b205 write_name
../../gcc/cp/mangle.c:810
0x72b0e0 write_local_name
../../gcc/cp/mangle.c:1808
0x72b0e0 write_name
../../gcc/cp/mangle.c:842
0x72bcbe write_class_enum_type
../../gcc/cp/mangle.c:2496
0x72bcbe write_type
../../gcc/cp/mangle.c:1954
0x72acc8 write_template_args
../../gcc/cp/mangle.c:2525
0x72f4ed write_nested_name
../../gcc/cp/mangle.c:941
0x72afa7 write_name
../../gcc/cp/mangle.c:854
0x72fe3b write_encoding
../../gcc/cp/mangle.c:704
0x730609 mangle_decl_string
../../gcc/cp/mangle.c:3383
0x730857 get_mangled_id
../../gcc/cp/mangle.c:3405
0x730857 mangle_decl(tree_node*)
../../gcc/cp/mangle.c:3428
0xdb03f0 decl_assembler_name(tree_node*)
../../gcc/tree.c:603
0x83f0d4 insert_to_assembler_name_hash
../../gcc/symtab.c:187
0x83f231 symtab_initialize_asm_name_hash()
../../gcc/symtab.c:366
0x84ea54 analyze_functions
../../gcc/cgraphunit.c:1135
0x84ffa5 finalize_compilation_unit()
../../gcc/cgraphunit.c:2333
0x63e4ae cp_write_global_declarations()
../../gcc/cp/decl2.c:4647
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.