[Bug c++/27177] [4.0/4.1/4.2 Regression] ICE in build_simple_base_path, at cp/class.c:474

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jun 2 22:39:00 GMT 2006



------- 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



More information about the Gcc-bugs mailing list