blob: 4cbdb77a19f5cf24f3af9103637dd986916fe7bf [file] [log] [blame]
// Test that executable with ELF-TLS will link/run successfully
// RUN: %clangxx -fno-emulated-tls %s -o %t
// RUN: %run %t 2>&1
// REQUIRES: android-29
#include <stdio.h>
#include <stdlib.h>
__thread void *tls_var;
int var;
void set_var() {
var = 123;
tls_var = &var;
}
int main() {
set_var();
fprintf(stderr, "Test alloc: %p\n", tls_var);
fflush(stderr);
return 0;
}