Skip to content

Commit 5e71a54

Browse files
committed
Add a few more interesting addresses to the addresses test.
1 parent 9b2390c commit 5e71a54

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
@@ -1,5 +1,7 @@
11
#include <stdio.h>
22
#include <limits.h>
3+
#include <errno.h>
4+
extern char **environ;
35

46
extern void __dso_handle;
57
#if !defined(__clang_major__) || __clang_major__ >= 10
@@ -19,5 +21,7 @@ int main(int argc, char *argv[]) {
1921
printf("__builtin_frame_address(0)=%p\n", __builtin_frame_address(0));
2022
printf("__builtin_alloca(0)=%p\n", __builtin_alloca(0));
2123
printf("__builtin_wasm_memory_size(0)=%p\n", (void *)(__builtin_wasm_memory_size(0) * PAGE_SIZE));
24+
printf("&errno=%p\n", (void *)&errno);
25+
printf("&environ=%p\n", (void *)&environ);
2226
return 0;
2327
}

0 commit comments

Comments
 (0)