summaryrefslogtreecommitdiff
path: root/test/wasm_backend/hello_num_only.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/wasm_backend/hello_num_only.cpp')
-rw-r--r--test/wasm_backend/hello_num_only.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/wasm_backend/hello_num_only.cpp b/test/wasm_backend/hello_num_only.cpp
new file mode 100644
index 000000000..d272f11c6
--- /dev/null
+++ b/test/wasm_backend/hello_num_only.cpp
@@ -0,0 +1,10 @@
+#include <emscripten.h>
+
+int main() {
+ int *x = (int*)8;
+ *x = 123;
+ EM_ASM({
+ Module.print("hello, world " + HEAP32[8>>2] + "!");
+ });
+}
+