Support 2D arrays.
diff --git a/libacc/tests/data/array.c b/libacc/tests/data/array.c
index 3af5e31..ca4a728 100644
--- a/libacc/tests/data/array.c
+++ b/libacc/tests/data/array.c
@@ -66,6 +66,34 @@
printf("\n");
}
+void testDecay() {
+ char c[4];
+ c[0] = 'H';
+ c[1] = 'i';
+ c[2] = '!';
+ c[3] = 0;
+ printf("testDecay: %s\n", c);
+}
+
+void test2D() {
+ char c[10][20];
+ int x;
+ int y;
+ printf("test2D:\n");
+ for(y = 0; y < 10; y++) {
+ for(x = 0; x < 20; x++) {
+ c[y][x] = 'a' + (15 & (y * 19 + x));
+ }
+ }
+ for(y = 0; y < 10; y++) {
+ for(x = 0; x < 20; x++) {
+ printf("%c", c[y][x]);
+ }
+ printf("\n");
+ }
+
+}
+
int main()
{
testLocalInt();
@@ -73,5 +101,7 @@
testGlobalChar();
testGlobalDouble();
testArgs();
+ testDecay();
+ test2D();
return 0;
}
diff --git a/libacc/tests/test.py b/libacc/tests/test.py
index 4ad2e13..9691c27 100644
--- a/libacc/tests/test.py
+++ b/libacc/tests/test.py
@@ -394,6 +394,18 @@
globalChar: 3
globalDouble: 3
testArgs: 0 2 4
+testDecay: Hi!
+test2D:
+abcdefghijdefghijklm
+defghijklmghijklmnop
+ghijklmnopjklmnopabc
+jklmnopabcmnopabcdef
+mnopabcdefpabcdefghi
+pabcdefghicdefghijkl
+cdefghijklfghijklmno
+fghijklmnoijklmnopab
+ijklmnopablmnopabcde
+lmnopabcdefghijklmno
result: 0
""","""""")