Index: src/tests/references.c
===================================================================
--- src/tests/references.c	(revision 5e5dbc2459a5e35e7a1bcb0fee0cccd00a03c402)
+++ src/tests/references.c	(revision b9c432fc0d6c9c1f4962af0e77cf031cf584dbf1)
@@ -45,4 +45,18 @@
 }
 
+// --- temporary code needed to make array of references subscript work.
+extern "C" {
+  void ** __index(__attribute__ ((unused)) size_t sizeof_T, __attribute__ ((unused)) size_t alignof_T, void **x, ptrdiff_t y) {
+    return (void **)((char *)x+y*sizeof(void *));
+  }
+  void __ctor(void ***dst, void **src) {
+    *dst = src;
+  }
+}
+__attribute__((alias("__index"))) forall( dtype T | sized(T) ) T && ?[?]( T & * x, ptrdiff_t y );
+__attribute__((alias("__ctor"))) forall( dtype DT ) void ?{}( DT & * & dst, DT & * src);
+forall( dtype DT ) void ^?{}( DT & * & ) {}
+// --- end of temporary code
+
 int main() {
 	int x = 123456, x2 = 789, *p1 = &x, **p2 = &p1, ***p3 = &p2,
@@ -52,9 +66,9 @@
 	*p3 = &p1;                          // change p2
 	int y = 0, z = 11, & ar[3] = { x, y, z };    // initialize array of references
-	// &ar[1] = &z;                        // change reference array element
-	// typeof( ar[1] ) p;                  // is int, i.e., the type of referenced object
-	// typeof( &ar[1] ) q;                 // is int &, i.e., the type of reference
-	// sizeof( ar[1] ) == sizeof( int );   // is true, i.e., the size of referenced object
-	// sizeof( &ar[1] ) == sizeof( int *); // is true, i.e., the size of a reference
+	&ar[1] = &z;                        // change reference array element
+	typeof( ar[1] ) p = 3;              // is int, i.e., the type of referenced object
+	typeof( &ar[1] ) q = &x;            // is int *, i.e., the type of pointer
+	_Static_assert( sizeof( ar[1] ) == sizeof( int ), "Array type should be int." );   // is true, i.e., the size of referenced object
+	_Static_assert( sizeof( &ar[1] ) == sizeof( int *), "Address of array should be int *." ); // is true, i.e., the size of a reference
 
 	((int*&)&r3) = &x;                  // change r1, (&*)**r3
