aboutsummaryrefslogtreecommitdiffstats
path: root/test/array-addr-mask.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/array-addr-mask.c')
-rw-r--r--test/array-addr-mask.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/array-addr-mask.c b/test/array-addr-mask.c
new file mode 100644
index 0000000..5ba5601
--- /dev/null
+++ b/test/array-addr-mask.c
@@ -0,0 +1,6 @@
+int main() {
+ unsigned int x[8] = {1,2,3,4,5,6,7,8};
+ unsigned int index = 6;
+ unsigned int addr = index & 3;
+ return (x[addr]);
+}