https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69889
Bug ID: 69889
Summary: [6 Regression] ICE: in assign_temp, at function.c:961
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bbannier+gcc_bugs at gmail dot com
Target Milestone: ---
I see an internal compiler error with the following code (reduced from actual
production code that passes with g++-5.3.0).
% cat log.ii
template struct Tag {
static void fp() { f()(0); }
static F f() {}
};
struct Dispatch {
template Dispatch(F&&) : f(Tag::fp) {}
void (*f)();
};
struct Empty { Empty(Empty&&); };
struct Value {
Value();
template Value(U);
void call(Dispatch);
Empty e;
};
struct EmptyValue {
EmptyValue(EmptyValue&&);
EmptyValue();
};
struct User {
User() {
Value().call([](Value) { return EmptyValue(); });
}
};
User user;
% g++ --std=c++11 -S log.ii
log.ii: In static member function ‘static EmptyValue
User::User()_FUN(Value)’:
log.ii:27:51: internal compiler error: in assign_temp, at function.c:961
Value().call([](Value) { return EmptyValue(); });
^
log.ii:27:51: internal compiler error: Abort trap: 6
g++: internal compiler error: Abort trap: 6 (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.