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: unassig...@gcc.gnu.org ReportedBy: x3n0m0rp...@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