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

             Bug #: 52327
           Summary: Virtual inheritance and template copy construction
                    doesn't call the correct copy constructors
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ryan_at_work_a...@hotmail.com


Created attachment 26714
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26714
Error test case

Using:

g++ (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The attached code produces the following output:

construct base
construct derived
construct top
COMMENCE NORMAL COPY
copy construct base
copy construct derived
copy construct top
COMMENCE TEMPLATED COPY
construct base
construct derived
copy construct top
DONE

For the templated copy, I expect the base and derived copy constructors to be
called (as such my application is losing information because these are NOT
being called).

Linux 2.6.40.3-0.fc15.x86_64

Reply via email to