diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2010-01-07 20:35:33 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2010-01-07 20:35:33 +0000 |
commit | ec168029aed5080d553e17217ff2be7ca7676a20 (patch) | |
tree | 6a89792a081bf4cd206c35f782c11dc200ccfd68 /libffi/testsuite | |
parent | 60a2e21391ffbe359b6100fd34cb4d19056a88cc (diff) | |
download | gcc-ec168029aed5080d553e17217ff2be7ca7676a20.zip gcc-ec168029aed5080d553e17217ff2be7ca7676a20.tar.gz gcc-ec168029aed5080d553e17217ff2be7ca7676a20.tar.bz2 |
re PR libffi/40701 (Many libffi tests fail to compile on Tru64 UNIX)
PR libffi/40701
* testsuite/libffi.call/ffitest.h [__alpha__ && __osf__] (PRIdLL,
PRIuLL, PRId64, PRIu64, PRIuPTR): Define.
* testsuite/libffi.call/cls_align_sint64.c: Add -Wno-format on
alpha*-dec-osf*.
* testsuite/libffi.call/cls_align_uint64.c: Likewise.
* testsuite/libffi.call/cls_ulonglong.c: Likewise.
* testsuite/libffi.call/return_ll1.c: Likewise.
* testsuite/libffi.call/stret_medium2.c: Likewise.
* testsuite/libffi.special/ffitestcxx.h (allocate_mmap): Cast
MAP_FAILED to char *.
From-SVN: r155710
Diffstat (limited to 'libffi/testsuite')
-rw-r--r-- | libffi/testsuite/libffi.call/cls_align_sint64.c | 1 | ||||
-rw-r--r-- | libffi/testsuite/libffi.call/cls_align_uint64.c | 1 | ||||
-rw-r--r-- | libffi/testsuite/libffi.call/cls_ulonglong.c | 1 | ||||
-rw-r--r-- | libffi/testsuite/libffi.call/ffitest.h | 12 | ||||
-rw-r--r-- | libffi/testsuite/libffi.call/return_ll1.c | 1 | ||||
-rw-r--r-- | libffi/testsuite/libffi.call/stret_medium2.c | 1 | ||||
-rw-r--r-- | libffi/testsuite/libffi.special/ffitestcxx.h | 2 |
7 files changed, 18 insertions, 1 deletions
diff --git a/libffi/testsuite/libffi.call/cls_align_sint64.c b/libffi/testsuite/libffi.call/cls_align_sint64.c index 2b15c98..31d53af 100644 --- a/libffi/testsuite/libffi.call/cls_align_sint64.c +++ b/libffi/testsuite/libffi.call/cls_align_sint64.c @@ -5,6 +5,7 @@ Originator: <hos@tamanegi.org> 20031203 */ /* { dg-do run } */ +/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */ #include "ffitest.h" typedef struct cls_struct_align { diff --git a/libffi/testsuite/libffi.call/cls_align_uint64.c b/libffi/testsuite/libffi.call/cls_align_uint64.c index 215584f..495c79f 100644 --- a/libffi/testsuite/libffi.call/cls_align_uint64.c +++ b/libffi/testsuite/libffi.call/cls_align_uint64.c @@ -6,6 +6,7 @@ /* { dg-do run } */ +/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */ #include "ffitest.h" typedef struct cls_struct_align { diff --git a/libffi/testsuite/libffi.call/cls_ulonglong.c b/libffi/testsuite/libffi.call/cls_ulonglong.c index c3cf0d6..235ab44 100644 --- a/libffi/testsuite/libffi.call/cls_ulonglong.c +++ b/libffi/testsuite/libffi.call/cls_ulonglong.c @@ -5,6 +5,7 @@ Originator: <andreast@gcc.gnu.org> 20030828 */ /* { dg-do run } */ +/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */ #include "ffitest.h" static void cls_ret_ulonglong_fn(ffi_cif* cif __UNUSED__, void* resp, diff --git a/libffi/testsuite/libffi.call/ffitest.h b/libffi/testsuite/libffi.call/ffitest.h index 7b1c5ef..2cb9849 100644 --- a/libffi/testsuite/libffi.call/ffitest.h +++ b/libffi/testsuite/libffi.call/ffitest.h @@ -60,6 +60,18 @@ #define PRIuLL "llu" #endif +/* Tru64 UNIX kludge. */ +#if defined(__alpha__) && defined(__osf__) +/* Tru64 UNIX V4.0 doesn't support %lld/%lld, but long is 64-bit. */ +#undef PRIdLL +#define PRIdLL "ld" +#undef PRIuLL +#define PRIuLL "lu" +#define PRId64 "ld" +#define PRIu64 "lu" +#define PRIuPTR "lu" +#endif + /* PA HP-UX kludge. */ #if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR) #define PRIuPTR "lu" diff --git a/libffi/testsuite/libffi.call/return_ll1.c b/libffi/testsuite/libffi.call/return_ll1.c index dad90c1..593e8a3 100644 --- a/libffi/testsuite/libffi.call/return_ll1.c +++ b/libffi/testsuite/libffi.call/return_ll1.c @@ -5,6 +5,7 @@ Originator: <andreast@gcc.gnu.org> 20050222 */ /* { dg-do run } */ +/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */ #include "ffitest.h" static long long return_ll(int ll0, long long ll1, int ll2) { diff --git a/libffi/testsuite/libffi.call/stret_medium2.c b/libffi/testsuite/libffi.call/stret_medium2.c index 1692c2d..cb2f2fb 100644 --- a/libffi/testsuite/libffi.call/stret_medium2.c +++ b/libffi/testsuite/libffi.call/stret_medium2.c @@ -7,6 +7,7 @@ Originator: Blake Chaffin 6/21/2007 */ /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ +/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */ #include "ffitest.h" typedef struct struct_72byte { diff --git a/libffi/testsuite/libffi.special/ffitestcxx.h b/libffi/testsuite/libffi.special/ffitestcxx.h index e300cce..83f5442 100644 --- a/libffi/testsuite/libffi.special/ffitestcxx.h +++ b/libffi/testsuite/libffi.special/ffitestcxx.h @@ -84,7 +84,7 @@ allocate_mmap (size_t size) MAP_PRIVATE, dev_zero_fd, 0); #endif - if (page == MAP_FAILED) + if (page == (char *) MAP_FAILED) { perror ("virtual memory exhausted"); exit (1); |