Sha256: 651ba17c26ac9f3731c780015e6dacb6b19ed090e89d4bdd8f529e8cfe814e83

Contents?: true

Size: 1.01 KB

Versions: 286

Compression:

Stored size: 1.01 KB

Contents

/* Area:	ffi_call, unwind info
   Purpose:	Check if the unwind information is passed correctly.
   Limitations:	none.
   PR:		none.
   Originator:	Andreas Tobler <andreast@gcc.gnu.org> 20061213  */

/* { dg-do run } */
#include "ffitestcxx.h"

static int checking(int a __UNUSED__, short b __UNUSED__,
		    signed char c __UNUSED__)
{
  throw 9;
}

int main (void)
{
  ffi_cif cif;
  ffi_type *args[MAX_ARGS];
  void *values[MAX_ARGS];
  ffi_arg rint;

  signed int si;
  signed short ss;
  signed char sc;

  args[0] = &ffi_type_sint;
  values[0] = &si;
  args[1] = &ffi_type_sshort;
  values[1] = &ss;
  args[2] = &ffi_type_schar;
  values[2] = &sc;

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

  si = -6;
  ss = -12;
  sc = -1;
  {
    try
      {
	ffi_call(&cif, FFI_FN(checking), &rint, values);
      } catch (int exception_code)
      {
	CHECK(exception_code == 9);
      }
    printf("part one OK\n");
    /* { dg-output "part one OK" } */
  }
  exit(0);
}

Version data entries

286 entries across 282 versions & 31 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.5.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.4.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
tdiary-5.0.7 vendor/bundle/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
comiditaULL-0.1.1 vendor/bundle/ruby/2.3.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
comidita_ull-0.1.1 vendor/bundle/ruby/2.3.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
comidita_ull-0.1.0 vendor/bundle/ruby/2.3.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
vagrant-unbundled-2.0.1.0 vendor/bundle/ruby/2.4.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
cloudsmith-api-0.21.4 vendor/bundle/ruby/2.3.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
tdiary-5.0.6 vendor/bundle/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
vagrant-unbundled-2.0.0.1 vendor/bundle/ruby/2.4.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
vagrant-unbundled-1.9.8.1 vendor/bundle/ruby/2.4.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
vagrant-unbundled-1.9.7.1 vendor/bundle/ruby/2.4.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
tdiary-5.0.5 vendor/bundle/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
tdiary-5.0.4 vendor/bundle/gems/ffi-1.9.18/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
ffi-1.9.18-x86-mingw32 ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
ffi-1.9.18-x64-mingw32 ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc