URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
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);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.