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++/53202] Copy constructor not called when starting a thread


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53202

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-03 08:30:38 UTC ---
For that preprocessed source the difference is in the Bind_simple constructor,
for 4.6 it is:

Bind_simple<Callable>::Bind_simple(const Callable&) [with Callable =
background_hello] (struct Bind_simple * const this, const struct
background_hello & callable)
{
  struct tuple * D.5382;
  struct tuple * D.5383;

  D.5382 = &this->_M_bound;
  std::tuple<background_hello>::tuple (D.5382, callable);
  try
    {

    }
  catch
    {
      D.5383 = &this->_M_bound;
      std::tuple<background_hello>::~tuple (D.5383);
    }
}

But for 4.8 it fails to initialise its member _M_bound:

Bind_simple<Callable>::Bind_simple(const Callable&) [with Callable =
background_hello] (struct Bind_simple * const this, const struct
background_hello & callable)
{
  struct tuple * D.6070;

  try
    {

    }
  catch
    {
      D.6070 = &this->_M_bound;
      std::tuple<background_hello>::~tuple (D.6070);
    }
}


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