Commit 9efc84e4 by John David Anglin

re PR testsuite/70583 (FAIL: g++.old-deja/g++.abi/vtable2.C -std=gnu++98 execution test)

	PR testsuite/70583
	* g++.old-deja/g++.abi/vtable2.C: Adjust CMP_VPTR define on hppa.

From-SVN: r245007
parent 4bfbe3ae
2017-01-28 John David Anglin <danglin@gcc.gnu.org> 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/debug7.adb: Skip on hppa*-*-hpux*.
* gnat.dg/debug9.adb: Likewise. * gnat.dg/debug9.adb: Likewise.
......
...@@ -142,10 +142,24 @@ extern "C" { ...@@ -142,10 +142,24 @@ extern "C" {
#define INC_VDATA(A,N) ((A) += 2*(N)) #define INC_VDATA(A,N) ((A) += 2*(N))
#endif #endif
#else #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)) #define CMP_VPTR(A, B) (*(A) == (ptrdiff_t)(B))
#endif /* __hppa__ */
#define INC_VPTR(A) ((A) += 1) #define INC_VPTR(A) ((A) += 1)
#define INC_VDATA(A,N) ((A) += (N)) #define INC_VDATA(A,N) ((A) += (N))
#endif #endif /* __ia64__ */
int main () int main ()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment