Sha256: 0cfa1b19658a5fb944fc4a998161188303be4790f400756a33daf752d3249878

Contents?: true

Size: 853 Bytes

Versions: 5933

Compression:

Stored size: 853 Bytes

Contents

/* Area:	ffi_call
   Purpose:	Check return value long long.
   Limitations:	none.
   PR:		none.
   Originator:	From the original ffitest.c  */

/* { dg-do run } */
#include "ffitest.h"
static long long return_ll(long long ll)
{
  return ll;
}

int main (void)
{
  ffi_cif cif;
  ffi_type *args[MAX_ARGS];
  void *values[MAX_ARGS];
  long long rlonglong;
  long long ll;

  args[0] = &ffi_type_sint64;
  values[0] = ≪

  /* Initialize the cif */
  CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
		     &ffi_type_sint64, args) == FFI_OK);

  for (ll = 0LL; ll < 100LL; ll++)
    {
      ffi_call(&cif, FFI_FN(return_ll), &rlonglong, values);
      CHECK(rlonglong == ll);
    }

  for (ll = 55555555555000LL; ll < 55555555555100LL; ll++)
    {
      ffi_call(&cif, FFI_FN(return_ll), &rlonglong, values);
      CHECK(rlonglong == ll);
    }
  exit(0);
}

Version data entries

5,933 entries across 5,910 versions & 69 rubygems

Version Path
ffi-1.1.0.rc3 ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
ffi-1.1.0.rc2-x86-mingw32 ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
ffi-1.1.0.rc2 ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
ffi-1.1.0.rc1 ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
ffi-1.0.12.rc3-x86-mingw32 ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
ffi-1.0.12.rc3 ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
ffi-1.0.12.rc2 ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
ffi-1.0.12.rc2-x86-mingw32 ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
classicCMS-0.2.3 vendor/bundle/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
classicCMS-0.2.2 vendor/bundle/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
classicCMS-0.2.1 vendor/bundle/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
classicCMS-0.2.0 vendor/bundle/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
classicCMS-0.1.2 vendor/bundle/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/ffi-0.6.3/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c