This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52327] New: Virtual inheritance and template copy construction doesn't call the correct copy constructors
- From: "ryan_at_work_also at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Feb 2012 16:42:51 +0000
- Subject: [Bug c++/52327] New: Virtual inheritance and template copy construction doesn't call the correct copy constructors
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: ryan_at_work_also@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