This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53202] Copy constructor not called when starting a thread
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 May 2012 08:30:38 +0000
- Subject: [Bug c++/53202] Copy constructor not called when starting a thread
- Auto-submitted: auto-generated
- References: <bug-53202-4@http.gcc.gnu.org/bugzilla/>
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);
}
}