[Bug c++/52619] ICE/segmentation fault in lambda function

t.schuele at web dot de gcc-bugzilla@gcc.gnu.org
Thu Mar 22 15:44:00 GMT 2012


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;};



More information about the Gcc-bugs mailing list