aboutsummaryrefslogtreecommitdiffstats
path: root/test/testFuncs2.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/testFuncs2.c')
-rw-r--r--test/testFuncs2.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/testFuncs2.c b/test/testFuncs2.c
index dac8ef0..7784619 100644
--- a/test/testFuncs2.c
+++ b/test/testFuncs2.c
@@ -47,4 +47,34 @@ int testfunc7(void)
int a;
int b;
//return;
+}
+
+int testfunc8(void)
+{
+ int a[10];
+ int b[10];
+
+ int* p;
+
+ p = &a[0];
+
+ int i;
+ int sum;
+ int sum2;
+ int garbage;
+ int garbage2;
+
+ for (i = 0; i < 10; ++i)
+ {
+ sum += *(a + i);
+ sum2 += *(p + i);
+ //garbage = *(a - b);
+ }
+
+ for (i = 10; i < 1; i++)
+ {
+ sum += *(a - i);
+ sum2 += *(p - i);
+ //garbage2 = *(p - a);
+ }
} \ No newline at end of file