URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [init/] [ctor7.C] - Rev 816
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;
}