aboutsummaryrefslogtreecommitdiffstats
path: root/test/array-volatile.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/array-volatile.c')
-rw-r--r--test/array-volatile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/array-volatile.c b/test/array-volatile.c
new file mode 100644
index 0000000..f12b79a
--- /dev/null
+++ b/test/array-volatile.c
@@ -0,0 +1,7 @@
+int main() {
+ int x[2] = {5, 10};
+ volatile int sum;
+ for(int j=0; j <2; j++)
+ sum += x[j];
+ return sum;
+}