This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/69889] New: [6 Regression] ICE: in assign_temp, at function.c:961
- From: "bbannier+gcc_bugs at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 21 Feb 2016 10:42:27 +0000
- Subject: [Bug c++/69889] New: [6 Regression] ICE: in assign_temp, at function.c:961
- Auto-submitted: auto-generated
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 <typename F> struct Tag {
static void fp() { f()(0); }
static F f() {}
};
struct Dispatch {
template <typename F> Dispatch(F&&) : f(Tag<F>::fp) {}
void (*f)();
};
struct Empty { Empty(Empty&&); };
struct Value {
Value();
template <typename U> 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()::<lambda(Value)>::_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.