URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [init/] [ctor7.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do run }
// Copyright (C) 2005 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 13 Oct 2005 <nathan@codesourcery.com>
// PR 23984:ICE
// Origin: Andrew Pinski pinskia@gcc.gnu.org
struct B
{
virtual void Foo ();
};
void B::Foo ()
{
}
struct D : virtual B
{
};
struct E
{
B *ptr;
E (B *);
};
static B *ptr;
E::E (B *ptr_)
:ptr (ptr_)
{
}
struct G : D, E
{
G ();
};
G::G ()
: E (this)
{
}
int main ()
{
G object;
return object.ptr != &object;
}