2017-01-28 John David Anglin <danglin@gcc.gnu.org>
+ PR testsuite/70583
+ * g++.old-deja/g++.abi/vtable2.C: Adjust CMP_VPTR define on hppa.
+
* gnat.dg/debug7.adb: Skip on hppa*-*-hpux*.
* gnat.dg/debug9.adb: Likewise.
#define INC_VDATA(A,N) ((A) += 2*(N))
#endif
#else
+// HPPA uses function pointers but they point to function descriptors.
+#if defined __hppa__
+#ifdef __hpux__
+#ifdef _LP64
+#define CMP_VPTR(A, B) (*(unsigned long *)(*(A)+16) == *(unsigned long *)((unsigned long)(B)+16))
+#else
+#define CMP_VPTR(A, B) (*(A) == (ptrdiff_t)(B))
+#endif /* _LP64 */
+#else
+extern "C" { unsigned int __canonicalize_funcptr_for_compare (void*); }
+#define CMP_VPTR(A, B) (__canonicalize_funcptr_for_compare(*(void **)A) == __canonicalize_funcptr_for_compare((void *)B))
+#endif /* __hpux__ */
+#else
#define CMP_VPTR(A, B) (*(A) == (ptrdiff_t)(B))
+#endif /* __hppa__ */
#define INC_VPTR(A) ((A) += 1)
#define INC_VDATA(A,N) ((A) += (N))
-#endif
+#endif /* __ia64__ */
int main ()
{