Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision 834d4fc488a7e141443f7b9d7f3f966648fdf1fd)
+++ src/ResolvExpr/Resolver.cc	(revision 2be10237217d3203f88d37d1da72d6ec3736ab71)
@@ -537,24 +537,25 @@
 		assert( callExpr );
 		Expression *& constructee = InitTweak::getCallArg( callExpr, 0 );
-		Type * type = 0;
-
-		// need to find the type of the first argument, which is unfortunately not uniform since array construction
-		// includes an untyped '+' expression.
-		if ( UntypedExpr * plusExpr = dynamic_cast< UntypedExpr * >( constructee ) ) {
-			// constructee is <array>+<index>
-			// get Variable <array>, then get the base type of the VariableExpr - this is the type that needs to be fixed
-			Expression * arr = InitTweak::getCallArg( plusExpr, 0 );
-			assert( dynamic_cast< VariableExpr * >( arr ) || dynamic_cast< MemberExpr *>( arr ) );
-			assert( arr && arr->get_results().size() == 1 );
-			type = arr->get_results().front()->clone();
-		} else {
-			// otherwise, constructing a plain object, which means the object's address is being taken.
-			// Need to get the type of the VariableExpr object, because the AddressExpr is rebuilt and uses the
-			// type of the VariableExpr to do so.
-			assert( constructee->get_results().size() == 1 );
-			AddressExpr * addrExpr = dynamic_cast< AddressExpr * > ( constructee );
-			assert( addrExpr && addrExpr->get_results().size() == 1 );
-			type = addrExpr->get_results().front()->clone();
-		}
+
+		// the first argument will always be &<expr>
+		AddressExpr * addrExpr = dynamic_cast< AddressExpr * > ( constructee );
+		assert( addrExpr );
+
+		// need to find the type of the first argument. In the case of an array,
+		// need to remove one ArrayType layer from the type for each subscript expression.
+		Expression * addressee = addrExpr->get_arg();
+		int numLayers = 0;
+		while ( UntypedExpr * untypedExpr = dynamic_cast< UntypedExpr * >( addressee ) ) {
+			assert( InitTweak::getFunctionName( untypedExpr ) == "?[?]" );
+			addressee = InitTweak::getCallArg( untypedExpr, 0 );
+			numLayers++;
+		}
+		assert( addressee->get_results().size() == 1 );
+		Type * type = addressee->get_results().front();
+		for ( int i = 0; i < numLayers; i++ ) {
+			type = InitTweak::getPointerBase( type );
+			assert( type && "Expected pointer or array type. May have generated too many ?[?] calls." );
+		}
+
 		// cast to T* with qualifiers removed.
 		// unfortunately, lvalue is considered a qualifier. For AddressExpr to resolve, its argument
@@ -562,9 +563,8 @@
 		// remove lvalue as a qualifier, this can change to
 		//   type->get_qualifiers() = Type::Qualifiers();
-		Type * base = InitTweak::getPointerBase( type );
-		assert( base );
-		base->get_qualifiers() -= Type::Qualifiers(true, true, true, false, true, true);
-		// if pointer has lvalue qualifier, cast won't appear in output
-		type->set_isLvalue( false );
+		assert( type );
+		type = type->clone();
+		type->get_qualifiers() -= Type::Qualifiers(true, true, true, false, true, true);
+		type = new PointerType( Type::Qualifiers(), type );
 		constructee = new CastExpr( constructee, type );
 
