aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.abi/vtable3.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.abi/vtable3.h')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.abi/vtable3.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.abi/vtable3.h b/gcc/testsuite/g++.old-deja/g++.abi/vtable3.h
index 327d346db27..4327b5f5ac4 100644
--- a/gcc/testsuite/g++.old-deja/g++.abi/vtable3.h
+++ b/gcc/testsuite/g++.old-deja/g++.abi/vtable3.h
@@ -7,11 +7,8 @@
#include <typeinfo>
#include <stdio.h>
-// XXX. vcall offsets are still broken, remove this define to re-enable
-// testing when fixed.
-#define NO_VCALL_TEST
-
int fail;
+struct A;
template <typename BASE, typename DERIVED>
int Test (DERIVED *d, int expect)
@@ -19,6 +16,7 @@ int Test (DERIVED *d, int expect)
BASE *b = static_cast <BASE *> (d);
void *full_b = dynamic_cast <void *> (b);
void *full_d = dynamic_cast <void *> (d);
+ A *ap = static_cast <A *> (b);
if (full_b != full_d)
{
@@ -37,8 +35,8 @@ int Test (DERIVED *d, int expect)
typeid (BASE).name (), typeid (DERIVED).name ());
return 1;
}
-#ifndef NO_VCALL_TEST
- b->Baz (static_cast <void *> (b));
+
+ b->Baz (static_cast <void *> (ap));
int res = b->Foo (static_cast <void *> (d));
@@ -49,7 +47,7 @@ int Test (DERIVED *d, int expect)
typeid (BASE).name (), res, expect);
return 1;
}
-#endif
+
return 0;
}