mirror of
git://repo.or.cz/tinycc.git
synced 2026-11-05 05:36:35 +08:00
Some checks failed
build and test / test-x86_64-linux (push) Has been cancelled
build and test / test-x86_64-osx (push) Has been cancelled
build and test / test-aarch64-osx (push) Has been cancelled
build and test / test-x86_64-win32 (push) Has been cancelled
build and test / test-i386-win32 (push) Has been cancelled
build and test / test-arm64-win32 (push) Has been cancelled
build and test / test-armv7-linux (push) Has been cancelled
build and test / test-aarch64-linux (push) Has been cancelled
build and test / test-riscv64-linux (push) Has been cancelled
build and test / test-i386-linux (push) Has been cancelled
Preserve symbolic offsets when materializing i386 TLS addresses, generate ARM64 TLS addresses from the thread pointer, and carry RISC-V addends on both halves of the TPREL relocation pair. Keep undefined ELF TLS symbols typed as STT_TLS so objects produced by TCC can be linked by the system linker. Extend the TLS regression coverage for narrow signed and unsigned accesses, address-taking, runtime indexing, thread isolation, large RISC-V offsets, unsupported runtimes, and external TLS definitions.
23 lines
471 B
C
23 lines
471 B
C
#include <stdio.h>
|
|
|
|
extern __thread signed short extern_tls_short;
|
|
extern __thread float extern_tls_float;
|
|
|
|
int main(void)
|
|
{
|
|
int errors = 0;
|
|
|
|
if (extern_tls_short != 1234 || extern_tls_float != 1.5f)
|
|
errors = 1;
|
|
|
|
extern_tls_short = -2222;
|
|
extern_tls_float = 2.5f;
|
|
extern_tls_float += 1.0f;
|
|
|
|
if (extern_tls_short != -2222 || extern_tls_float != 3.5f)
|
|
errors = 1;
|
|
|
|
printf("extern tls errors: %d\n", errors);
|
|
return errors;
|
|
}
|