https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79296
Bug ID: 79296
Summary: [5 Regression] ICE in mangle_decl, at cp/mangle.c:3845
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: doko at gcc dot gnu.org
Target Milestone: ---
Created attachment 40628
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40628&action=edit
preprocessed source
seen with 20170129
$ cat test_alias_initialization.ii
namespace a {
class b {
public:
template <typename c, typename h> b(c h::*...) {
[] {};
}
};
class d {};
template <typename> class e {
public:
template <typename g> void ab(const char *, g l) { b(l, int()); }
};
}
template <typename> class ac;
template <typename ad> class B {
protected:
static ad i(int) {}
};
template <typename, typename> class o;
template <typename af, typename ad, typename... j>
class o<af(j...), ad> : B<ad> {
public:
static af k(const int &p1, j... l) { B<ad>::i(p1)(l...); }
};
template <typename af, typename... j> class ac<af(j...)> {
template <typename, typename> using m = int;
public:
template <typename ad, typename = m<int, void>, typename = m<int, void>>
ac(ad);
using ah = af (*)(const int &, j...);
ah n;
};
template <typename af, typename... j>
template <typename ad, typename, typename>
ac<af(j...)>::ac(ad) {
n = o<af(j...), ad>::k;
}
namespace ai = a;
class q {
public:
q(ac<void(ai::d)>);
} r([](ai::d) {
struct p {
virtual void f();
};
struct aj;
ai::e<aj>().ab("", &p::f);
});
$ g++ -c -std=c++14 -flto test_alias_initialization.ii
test_alias_initialization.ii:5:6: internal compiler error: in mangle_decl, at
cp/mangle.c:3845
[] {};
^
0x6f3372 mangle_decl(tree_node*)
../../src/gcc/cp/mangle.c:3844
0xd29b1b decl_assembler_name(tree_node*)
../../src/gcc/tree.c:671
0xd29b1b assign_assembler_name_if_needed(tree_node*)
../../src/gcc/tree.c:5920
0xd2aeb1 free_lang_data_in_cgraph
../../src/gcc/tree.c:5969
0xd2aeb1 free_lang_data
../../src/gcc/tree.c:6006
0xd2aeb1 execute
../../src/gcc/tree.c:6055
Please submit a full bug report,
with preprocessed source if appropriate.