diff options
Diffstat (limited to 'test/lld/recursive.c')
-rw-r--r-- | test/lld/recursive.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/lld/recursive.c b/test/lld/recursive.c new file mode 100644 index 000000000..c0cdaa425 --- /dev/null +++ b/test/lld/recursive.c @@ -0,0 +1,15 @@ +// This test emits a stack pointer, which tests global importing in object files +// (which are mutable and not normally allowed). + +int printf(const char* fmt, ...); + +__attribute__((noinline)) +int foo(int a, int b) { + printf("%d:%d\n", a, b); + return a + b; +} + +int main() { + printf("Result: %d\n", foo(1, 2)); + return 0; +} |