From 9b2390ca3dd35a378283e1ba1efc7519998db26d Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 20 Dec 2019 17:09:43 -0800 Subject: [PATCH] Don't compile `__data_end` on clang 9.0. --- tests/compile-only/addresses.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/compile-only/addresses.c b/tests/compile-only/addresses.c index c97dc60..1fb0da7 100644 --- a/tests/compile-only/addresses.c +++ b/tests/compile-only/addresses.c @@ -2,16 +2,20 @@ #include extern void __dso_handle; +#if !defined(__clang_major__) || __clang_major__ >= 10 extern void __data_end; extern void __global_base; extern void __heap_base; +#endif int main(int argc, char *argv[]) { printf("NULL=%p\n", NULL); printf("__dso_handle=%p\n", &__dso_handle); +#if !defined(__clang_major__) || __clang_major__ >= 10 printf("__data_end=%p\n", &__data_end); printf("__global_base=%p\n", &__global_base); printf("__heap_base=%p\n", &__heap_base); +#endif printf("__builtin_frame_address(0)=%p\n", __builtin_frame_address(0)); printf("__builtin_alloca(0)=%p\n", __builtin_alloca(0)); printf("__builtin_wasm_memory_size(0)=%p\n", (void *)(__builtin_wasm_memory_size(0) * PAGE_SIZE));