This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55677] New: Virtual inheritance, 'this' pointer used as constructor parameter, parameter specialized in derived method, generated binary dumps core
- From: "x3n0m0rph59 at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 13 Dec 2012 20:31:41 +0000
- Subject: [Bug c++/55677] New: Virtual inheritance, 'this' pointer used as constructor parameter, parameter specialized in derived method, generated binary dumps core
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55677
Bug #: 55677
Summary: Virtual inheritance, 'this' pointer used as
constructor parameter, parameter specialized in
derived method, generated binary dumps core
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: x3n0m0rph59@googlemail.com
If I compile the attached c++11 source with g++ and execute it, it dumps core
on my system. If I compile it with clang++ or msvc11 it works.
I don't know if the attached program source is legal C++ or not!? There is no
warning generated on any of the compilers I've tried, including g++.
The interesting part is in file 'class2.hpp'. If you replace the type 'class
middle' with 'class class1' the g++ binary doesn't dump core anymore
Does NOT work:
class2(middle *var) :
class1(var)
{
}
Does work:
class2(class1 *var) :
class1(var)
{
}
System:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.10
Release: 12.10
Codename: quantal
g++ --version
g++ (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
- Follow-Ups:
- [Bug c++/55677] Virtual inheritance, 'this' pointer used as constructor parameter, parameter specialized in derived method, generated binary dumps core
- From: x3n0m0rph59 at googlemail dot com
- [Bug c++/55677] Virtual inheritance, 'this' pointer used as constructor parameter, parameter specialized in derived method, generated binary dumps core
- From: paolo.carlini at oracle dot com
- [Bug c++/55677] Virtual inheritance, 'this' pointer used as constructor parameter, parameter specialized in derived method, generated binary dumps core
- From: x3n0m0rph59 at googlemail dot com
- [Bug c++/55677] Virtual inheritance, 'this' pointer used as constructor parameter, parameter specialized in derived method, generated binary dumps core
- From: x3n0m0rph59 at googlemail dot com
- [Bug c++/55677] Virtual inheritance, 'this' pointer used as constructor parameter, parameter specialized in derived method, generated binary dumps core
- From: vlukas at gmx dot de
- [Bug c++/55677] Virtual inheritance, 'this' pointer used as constructor parameter, parameter specialized in derived method, generated binary dumps core
- From: vlukas at gmx dot de