OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [inherit/] [thunk1.C] - Diff between revs 301 and 384

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 384
// { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* alpha*-*-* ia64-*-* sparc*-*-* } }
// { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* alpha*-*-* ia64-*-* sparc*-*-* } }
#include 
#include 
extern "C" void abort ();
extern "C" void abort ();
struct A {
struct A {
  virtual void f (int, ...) {}
  virtual void f (int, ...) {}
  int i;
  int i;
};
};
struct B : virtual public A {
struct B : virtual public A {
};
};
struct C : public B {
struct C : public B {
  C ();
  C ();
  virtual void f (int, ...);
  virtual void f (int, ...);
};
};
extern C* cp;
extern C* cp;
C::C () { cp = this; }
C::C () { cp = this; }
void C::f (int i, ...) {
void C::f (int i, ...) {
  if (this != cp)
  if (this != cp)
    abort ();
    abort ();
  va_list ap;
  va_list ap;
  if (i != 3)
  if (i != 3)
    abort ();
    abort ();
  va_start (ap, i);
  va_start (ap, i);
  if (va_arg (ap, int) != 7)
  if (va_arg (ap, int) != 7)
    abort ();
    abort ();
  va_end (ap);
  va_end (ap);
}
}
C* cp = new C;
C* cp = new C;
int main ()
int main ()
{
{
  cp->f (3, 7);
  cp->f (3, 7);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.