MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / test

Function test

test/core/test_stack.c:11–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <stdio.h>
10
11int test(int i) {
12 int x = 10;
13 int ret = (long)&x; // both for the number, and forces x to not be nativized
14 if (i > 0) {
15 if ((i % 2001) != 1500)
16 return test(i - 1);
17 else
18 return test(i - 1) + test(i - 2);
19 }
20 return ret;
21}
22
23int main(int argc, char **argv) {
24 // We should get the same value for the first and last - stack has unwound

Callers 2

test_wrapperFunction · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected