[Bug c++/13009] New: Implicitly-defined assignment operator writes to wrong memory

oldfishdontdie at hotmail dot com gcc-bugzilla@gcc.gnu.org
Tue Nov 11 15:38:00 GMT 2003


In a class that virtually inherits another class, the implicitly-defined 
assignment operator copies the object to the wrong location when called for an 
object of a more derived class.
The attached example, when compiled with g++-3.3.1/g++-3.3.2, prints out "cb" 
instead of "bc".

-- 
           Summary: Implicitly-defined assignment operator writes to wrong
                    memory
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: oldfishdontdie at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list