Index: src/GenPoly/Lvalue.cc
===================================================================
--- src/GenPoly/Lvalue.cc	(revision 70a5acf64cb1850994236fd2ed4362de64437a59)
+++ src/GenPoly/Lvalue.cc	(revision f74eb47b67635f6f7417c39c044b16d594cfd993)
@@ -276,5 +276,7 @@
 
 		Expression * AddrRef::postmutate( AddressExpr * addrExpr ) {
+			PRINT( std::cerr << "addr ref at " << addrExpr << std::endl; )
 			if ( refDepth == 0 ) {
+				PRINT( std::cerr << "depth 0, get new depth..." << std::endl; )
 				// this is the innermost address-of in a chain, record depth D
 				if ( ! isIntrinsicReference( addrExpr->arg ) ) {
@@ -282,4 +284,5 @@
 					// xxx - is this condition still necessary? intrinsicReferences should have a cast around them at this point, so I don't think this condition ever fires.
 					refDepth = addrExpr->arg->result->referenceDepth();
+					PRINT( std::cerr << "arg not intrinsic reference, new depth is: " << refDepth << std::endl; )
 				} else {
 					assertf( false, "AddrRef : address-of should not have intrinsic reference argument: %s", toCString( addrExpr->arg ) );
@@ -287,4 +290,5 @@
 			}
 			if ( current ) { // this is the outermost address-of in a chain
+				PRINT( std::cerr << "current, depth is: " << refDepth << std::endl; )
 				Expression * ret = addrExpr;
 				while ( refDepth ) {
@@ -295,8 +299,10 @@
 
 				if ( addCast ) {
+					PRINT( std::cerr << "adding cast..." << std::endl; )
 					return new CastExpr( ret, addrExpr->result->clone() );
 				}
 				return ret;
 			}
+			PRINT( std::cerr << "not current..." << std::endl; )
 			return addrExpr;
 		}
