aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-12-17 10:04:55 +0000
committerYann Herklotz <git@yannherklotz.com>2020-12-17 10:04:55 +0000
commit6109d3d4af3efed0dddaa6bf1aa532dd83d8d465 (patch)
tree821cb061f47d7f66688ccf1eeb8f4170b409a61f /test
parentf353cc0a0a6b22236be74dfd1d04400a97b1b6f1 (diff)
downloadvericert-6109d3d4af3efed0dddaa6bf1aa532dd83d8d465.tar.gz
vericert-6109d3d4af3efed0dddaa6bf1aa532dd83d8d465.zip
Modify array test case to be suitable for loop pipelining
Diffstat (limited to 'test')
-rw-r--r--test/array.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/array.c b/test/array.c
index 0f23cc8..59299a5 100644
--- a/test/array.c
+++ b/test/array.c
@@ -1,7 +1,9 @@
int main() {
- int x[3] = {1, 2, 3};
+ int x[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int sum = 0;
- for (int i = 0; i < 3; i++)
- sum = x[i];
+ for (int i = 0; i < 10; i++) {
+ sum = sum + x[i];
+ x[i] = sum;
+ }
return sum;
}