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 middle-end/45699] [4.6 Regression] Incorrect copy constructor generated with -O


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

--- Comment #10 from Martin Jambor <jamborm at gcc dot gnu.org> 2010-10-08 16:51:19 UTC ---
I think I know what is going on.  BINFO_VIRTUALS of the BINFO
describing Probability_Model within Parameters pint to a wring thunk
of the method Parameters:clone().

Therefore when the call is devirtualized, the this parameter is not
adjusted to point to the whole Ptr object and points only to the part
representing the Probability_Model ancestor.  And so all references to
the fields of the object just load garbage.


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