diff --git a/vm/ffi_test.c b/vm/ffi_test.c index 2bef4a5465..e830b50a30 100644 --- a/vm/ffi_test.c +++ b/vm/ffi_test.c @@ -333,3 +333,14 @@ struct ulonglong_pair ffi_test_63() { return ullp; } +void* bug1021_test_1(void* x, int y) { + return (void*)((y * y) + (long)x); +} + +int bug1021_test_2(int x, char *y, void *z) { + return y[0]; +} + +void* bug1021_test_3(int x) { + return (void*)((long)x); +} diff --git a/vm/ffi_test.h b/vm/ffi_test.h index e813ec990d..3c7ff1edba 100644 --- a/vm/ffi_test.h +++ b/vm/ffi_test.h @@ -231,3 +231,6 @@ struct ulonglong_pair { FACTOR_EXPORT struct ulonglong_pair ffi_test_63(); +FACTOR_EXPORT void* bug1021_test_1(void* x, int y); +FACTOR_EXPORT int bug1021_test_2(int x, char* y, void *z); +FACTOR_EXPORT void* bug1021_test_3(int x);