------- Comment #4 from reichelt at gcc dot gnu dot org  2006-06-02 22:38 
-------
Here's an even shorter testcase:

=============================================
struct X {};

struct Y : virtual X {};
struct Z : virtual X {};

struct A : Y, Z {};

struct B : A
{
  static const int i = sizeof((Z*)(B*)0);
};
=============================================

A simpler testcase was fixed (or maybe only papered over) in GCC 4.0.3:

=============================================
struct A { virtual ~A(); };

struct B : A
{
  static const int i = sizeof((A*)(B*)0);
};
=============================================

A slight modification results in a testcase that crashes with a segfault
since GCC 3.2:

=============================================
struct A {};

struct B : virtual A
{
  static const int i = sizeof((A*)(B*)0);
};
=============================================


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
           Keywords|                            |monitored


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

Reply via email to