From 65cdeb76c33ddb059632c9b227e5ab13c65c6b72 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 8 Jan 2020 13:02:37 +0100 Subject: add an example --- test/monniaux/moves/array.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/monniaux/moves/array.c (limited to 'test/monniaux/moves') diff --git a/test/monniaux/moves/array.c b/test/monniaux/moves/array.c new file mode 100644 index 00000000..faa1d96b --- /dev/null +++ b/test/monniaux/moves/array.c @@ -0,0 +1,18 @@ +void incr_double_array(double *t) { + double x0 = 1.0; + double t0 = t[0]; + double x1 = 1.0; + double t1 = t[1]; + double x2 = 1.0; + double t2 = t[2]; + double x3 = 1.0; + double t3 = t[3]; + t0 = t0 + x0; + t1 = t1 + x1; + t2 = t2 + x2; + t3 = t3 + x3; + t[0] = t0; + t[1] = t1; + t[2] = t2; + t[3] = t3; +} -- cgit