public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55677] New: Virtual inheritance, 'this' pointer used as constructor parameter, parameter specialized in derived method, generated binary dumps core
@ 2012-12-13 20:32 x3n0m0rph59 at googlemail dot com
  2012-12-13 20:34 ` [Bug c++/55677] " x3n0m0rph59 at googlemail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: x3n0m0rph59 at googlemail dot com @ 2012-12-13 20:32 UTC (permalink / raw)
  To: gcc-bugs


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-23 11:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-13 20:32 [Bug c++/55677] New: Virtual inheritance, 'this' pointer used as constructor parameter, parameter specialized in derived method, generated binary dumps core x3n0m0rph59 at googlemail dot com
2012-12-13 20:34 ` [Bug c++/55677] " x3n0m0rph59 at googlemail dot com
2012-12-14 10:24 ` paolo.carlini at oracle dot com
2012-12-14 16:18 ` x3n0m0rph59 at googlemail dot com
2012-12-14 16:19 ` x3n0m0rph59 at googlemail dot com
2012-12-14 18:52 ` vlukas at gmx dot de
2012-12-14 18:56 ` vlukas at gmx dot de
2013-08-23 11:29 ` paolo.carlini at oracle dot com
2013-08-23 11:30 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).