Fix building with Clang for Darwin (OS X 10.6+ and iOS
4.0+)
This commit is contained in:
committed by
Anthony Green
parent
3afaa9a34a
commit
39dccddb60
BIN
testsuite/libffi.call/a.out
Executable file
BIN
testsuite/libffi.call/a.out
Executable file
Binary file not shown.
@@ -9,6 +9,7 @@
|
||||
static int promotion(signed char sc, signed short ss,
|
||||
unsigned char uc, unsigned short us)
|
||||
{
|
||||
printf ("%d + %d + %d + %d\n", (int) sc, (int) ss, (int) uc, (int) us);
|
||||
int r = (int) sc + (int) ss + (int) uc + (int) us;
|
||||
|
||||
return r;
|
||||
@@ -50,6 +51,7 @@ int main (void)
|
||||
for (us = 0; us <= 60000; us += 10000)
|
||||
{
|
||||
ul++;
|
||||
printf ("%d + %d + %d + %d\n", (int) sc, (int) ss, (int) uc, (int) us);
|
||||
ffi_call(&cif, FFI_FN(promotion), &rint, values);
|
||||
CHECK((int)rint == (signed char) sc + (signed short) ss +
|
||||
(unsigned char) uc + (unsigned short) us);
|
||||
|
||||
Reference in New Issue
Block a user