This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52619] ICE/segmentation fault in lambda function
- From: "t.schuele at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Mar 2012 15:36:42 +0000
- Subject: [Bug c++/52619] ICE/segmentation fault in lambda function
- Auto-submitted: auto-generated
- References: <bug-52619-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52619
--- Comment #3 from Tobias Schuele <t.schuele at web dot de> 2012-03-22 15:36:42 UTC ---
Here is a testcase not including anything:
template <typename T>
struct foo {
operator T() {
return T();
}
};
template<typename T>
struct test {
foo<int> x;
void bar() {
auto f = [this] {return x != 0;};
}
};
As in the above testcase, the ICE disappears if implicit type conversion is
avoided:
auto f = [this] {return (int)x != 0;};