Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision 579263a52ab065d42a5208e15e3d707dd0d03798)
+++ src/CodeGen/CodeGenerator.cc	(revision 6242335009c5d2ebee1bb50d1d228f5aacb0e5bd)
@@ -292,13 +292,13 @@
 		if ( designators.size() == 0 ) return;
 		for ( Expression * des : designators ) {
-			if ( dynamic_cast< ConstantExpr * >( des ) ) {
-				// if expression is a ConstantExpr, then initializing array element
+			if ( dynamic_cast< NameExpr * >( des ) || dynamic_cast< VariableExpr * >( des ) ) {
+				// if expression is a NameExpr or VariableExpr, then initializing aggregate member
+				output << ".";
+				des->accept( *this );
+			} else {
+				// otherwise, it has to be a ConstantExpr or CastExpr, initializing array eleemnt
 				output << "[";
 				des->accept( *this );
 				output << "]";
-			} else {
-				// if not a ConstantExpr, it has to be a NameExpr or VariableExpr, initializing aggregate member
-				output << ".";
-				des->accept( *this );
 			} // if
 		} // for
