http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55538
Bug #: 55538
Summary: [C++11] ICE when calling a member function from lambda
in templated class; in get_expr_operands, at
tree-ssa-operands.c:1035
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
Input:
------
#include <functional>
struct IBar
{
virtual void runLambda(const std::function<void ()>& func) const = 0;
};
template<bool x>
struct Foo
{
void test(IBar* b)
{
b->runLambda([this]() { onTest(); });
}
void onTest() {}
};
int main(int argc, char** argv)
{
Foo<true> f;
f.test(nullptr);
return 0;
}
Output:
-------
test.cpp: In lambda function:
test.cpp:25:1: internal compiler error: in get_expr_operands, at
tree-ssa-operands.c:1035