From 56fdab2ff0caaaa88a152ef06aef821f432fe488 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Wed, 8 Jan 2014 22:54:39 +0100 Subject: Added args1 and args2 test. --- tests/exec/args2.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/exec/args2.cpp (limited to 'tests/exec/args2.cpp') diff --git a/tests/exec/args2.cpp b/tests/exec/args2.cpp new file mode 100644 index 0000000..1d2efee --- /dev/null +++ b/tests/exec/args2.cpp @@ -0,0 +1,15 @@ +#include + +int test(int a) { + int *b = &a; + *b = *b + 42; + return a; +} + +int main() { + int x = 0; + int y = test(x); + std::cout << "x = " << x << "\n"; + std::cout << "y = " << y << "\n"; +} + -- cgit v1.2.3