Skip to content

Commit 9b2390c

Browse files
committed
Don't compile __data_end on clang 9.0.
1 parent 8fe9c63 commit 9b2390c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/compile-only/addresses.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22
#include <limits.h>
33

44
extern void __dso_handle;
5+
#if !defined(__clang_major__) || __clang_major__ >= 10
56
extern void __data_end;
67
extern void __global_base;
78
extern void __heap_base;
9+
#endif
810

911
int main(int argc, char *argv[]) {
1012
printf("NULL=%p\n", NULL);
1113
printf("__dso_handle=%p\n", &__dso_handle);
14+
#if !defined(__clang_major__) || __clang_major__ >= 10
1215
printf("__data_end=%p\n", &__data_end);
1316
printf("__global_base=%p\n", &__global_base);
1417
printf("__heap_base=%p\n", &__heap_base);
18+
#endif
1519
printf("__builtin_frame_address(0)=%p\n", __builtin_frame_address(0));
1620
printf("__builtin_alloca(0)=%p\n", __builtin_alloca(0));
1721
printf("__builtin_wasm_memory_size(0)=%p\n", (void *)(__builtin_wasm_memory_size(0) * PAGE_SIZE));

0 commit comments

Comments
 (0)