This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]