tinycc/tests/tests2/104+_inline.c
grischka d76e03232b win64: hi-mem adjustments
- x86_64-link.c:
  ignore relocation overflow to undefined (weak) symbols
- 104_inline.test:
  test lower 32 bits only
- tccpe.c:
  support -Wl,--image-base=... above the 32bit range
2022-10-13 20:32:47 +02:00

55 lines
1.6 KiB
C

#define GOT(f) \
__attribute__((weak)) void f(void); \
printf("%d %s\n", !!((__SIZE_TYPE__)f & ~0u), #f);
int printf(const char*, ...);
void check_exports()
{
// 0
GOT(inline_inline_2decl_only)
GOT(inline_inline_undeclared)
GOT(inline_inline_predeclared)
GOT(inline_inline_postdeclared)
GOT(inline_inline_prepostdeclared)
GOT(inline_inline_undeclared2)
GOT(inline_inline_predeclared2)
GOT(inline_inline_postdeclared2)
GOT(inline_inline_prepostdeclared2)
// 1
GOT(extern_extern_postdeclared)
GOT(extern_extern_postdeclared2)
GOT(extern_extern_predeclared)
GOT(extern_extern_predeclared2)
GOT(extern_extern_prepostdeclared)
GOT(extern_extern_prepostdeclared2)
GOT(extern_extern_undeclared)
GOT(extern_extern_undeclared2)
GOT(extern_postdeclared)
GOT(extern_postdeclared2)
GOT(extern_predeclared)
GOT(extern_predeclared2)
GOT(extern_prepostdeclared)
GOT(extern_undeclared)
GOT(extern_undeclared2)
GOT(inst2_extern_inline_postdeclared)
GOT(inst2_extern_inline_predeclared)
GOT(inst3_extern_inline_predeclared)
GOT(inst_extern_inline_postdeclared)
GOT(inst_extern_inline_predeclared)
GOT(main)
GOT(noinst_extern_inline_func)
GOT(noinst_extern_inline_postdeclared)
GOT(noinst_extern_inline_postdeclared2)
GOT(noinst_extern_inline_undeclared)
// 0
GOT(noinst_static_inline_postdeclared)
GOT(noinst2_static_inline_postdeclared)
GOT(noinst_static_inline_predeclared)
GOT(noinst2_static_inline_predeclared)
GOT(static_func)
}