Files
RedBear-OS/recipes/libs/libffi/source/testsuite/libffi.go/aa-direct.c
T
vasilito ff4ff35918 feat: track all source trees in git — full fork offline-first model
Red Bear OS is a full fork. All sources must be available from git clone
with zero network access. Removed gitignore rules that excluded fetched
source trees under recipes/*/source/, local/recipes/kde/*/source/,
local/recipes/qt/*/source/, and vendor source trees.

Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded.

127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt
frameworks, mesa, wayland, DRM drivers, and every other recipe source.
2026-05-14 10:55:53 +01:00

35 lines
723 B
C

/* { dg-do run } */
#include "static-chain.h"
#if defined(__GNUC__) && !defined(__clang__) && defined(STATIC_CHAIN_REG)
#include "ffitest.h"
/* Blatent assumption here that the prologue doesn't clobber the
static chain for trivial functions. If this is not true, don't
define STATIC_CHAIN_REG, and we'll test what we can via other tests. */
void *doit(void)
{
register void *chain __asm__(STATIC_CHAIN_REG);
return chain;
}
int main()
{
ffi_cif cif;
void *result;
CHECK(ffi_prep_cif(&cif, ABI_NUM, 0, &ffi_type_pointer, NULL) == FFI_OK);
ffi_call_go(&cif, FFI_FN(doit), &result, NULL, &result);
CHECK(result == &result);
return 0;
}
#else /* UNSUPPORTED */
int main() { return 0; }
#endif