summaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-22 11:47:52 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-22 11:47:52 +0000
commit7e778de8d340e64b4dbb4eb171a8b21c80cc81f0 (patch)
treecdf5acb681b5d72685f4c8363fdc127178f854cd /libffi
parentbb268663e104df2aff908ce0cecf9ce5affe0ea5 (diff)
downloadgcc-7e778de8d340e64b4dbb4eb171a8b21c80cc81f0.tar.gz
Fix several libffi testsuite failures on 64-bit SPARC and PowerPC (PR libffi/56033)
PR libffi/56033 * testsuite/libffi.call/cls_struct_va1.c (test_fn): Cast resp to ffi_arg *. * testsuite/libffi.call/cls_uint_va.c (cls_ret_T_fn): Likewise. * testsuite/libffi.call/va_1.c (main): Change res to ffi_arg. * testsuite/libffi.call/va_struct1.c (main): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199194 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog10
-rw-r--r--libffi/testsuite/libffi.call/cls_struct_va1.c2
-rw-r--r--libffi/testsuite/libffi.call/cls_uint_va.c4
-rw-r--r--libffi/testsuite/libffi.call/va_1.c2
-rw-r--r--libffi/testsuite/libffi.call/va_struct1.c2
5 files changed, 15 insertions, 5 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 23a6a7800a4..892e87a1560 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,13 @@
+2013-05-22 Dominique d'Humieres <dominiq@lps.ens.fr>
+ Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR libffi/56033
+ * testsuite/libffi.call/cls_struct_va1.c (test_fn): Cast resp to
+ ffi_arg *.
+ * testsuite/libffi.call/cls_uint_va.c (cls_ret_T_fn): Likewise.
+ * testsuite/libffi.call/va_1.c (main): Change res to ffi_arg.
+ * testsuite/libffi.call/va_struct1.c (main): Likewise.
+
2013-03-22 Kai Tietz <ktietz@redhat.com>
* src/x86/win64.S: Make use of ffi_closure_win64_inner
diff --git a/libffi/testsuite/libffi.call/cls_struct_va1.c b/libffi/testsuite/libffi.call/cls_struct_va1.c
index 91772bd4068..7262d630dd6 100644
--- a/libffi/testsuite/libffi.call/cls_struct_va1.c
+++ b/libffi/testsuite/libffi.call/cls_struct_va1.c
@@ -35,7 +35,7 @@ test_fn (ffi_cif* cif __UNUSED__, void* resp,
printf ("%d %d %d %d %d %d %d %d %d %d\n", n, s1.a, s1.b,
l1.a, l1.b, l1.c, l1.d, l1.e,
s2.a, s2.b);
- * (int*) resp = 42;
+ * (ffi_arg*) resp = 42;
}
int
diff --git a/libffi/testsuite/libffi.call/cls_uint_va.c b/libffi/testsuite/libffi.call/cls_uint_va.c
index 150fddd515d..b04cfd19c2c 100644
--- a/libffi/testsuite/libffi.call/cls_uint_va.c
+++ b/libffi/testsuite/libffi.call/cls_uint_va.c
@@ -13,9 +13,9 @@ typedef unsigned int T;
static void cls_ret_T_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
- *(T *)resp = *(T *)args[0];
+ *(ffi_arg *)resp = *(T *)args[0];
- printf("%d: %d %d\n", *(T *)resp, *(T *)args[0], *(T *)args[1]);
+ printf("%d: %d %d\n", (int)*(ffi_arg *)resp, *(T *)args[0], *(T *)args[1]);
}
typedef T (*cls_ret_T)(T, ...);
diff --git a/libffi/testsuite/libffi.call/va_1.c b/libffi/testsuite/libffi.call/va_1.c
index cf4dd85cede..7f96809ea9e 100644
--- a/libffi/testsuite/libffi.call/va_1.c
+++ b/libffi/testsuite/libffi.call/va_1.c
@@ -94,7 +94,7 @@ main (void)
struct large_tag l1;
int n;
- int res;
+ ffi_arg res;
unsigned char uc;
signed char sc;
diff --git a/libffi/testsuite/libffi.call/va_struct1.c b/libffi/testsuite/libffi.call/va_struct1.c
index 11d1f10e5c6..e6452061c1d 100644
--- a/libffi/testsuite/libffi.call/va_struct1.c
+++ b/libffi/testsuite/libffi.call/va_struct1.c
@@ -61,7 +61,7 @@ main (void)
struct large_tag l1;
int n;
- int res;
+ ffi_arg res;
s_type.size = 0;
s_type.alignment = 0;