Index: src/GenPoly/Lvalue.cc
===================================================================
--- src/GenPoly/Lvalue.cc	(revision a9b1b0ce2830fa273190150c17c6a2df55ac5089)
+++ src/GenPoly/Lvalue.cc	(revision 207b496c369aa4d1d71645a349db9d309b33d5a8)
@@ -206,11 +206,16 @@
 						)
 						// TODO: it's likely that the second condition should be ... && ! isIntrinsicReference( arg ), but this requires investigation.
-						if ( function->get_linkage() != LinkageSpec::Intrinsic && isIntrinsicReference( arg ) ) {
-							// if argument is dereference or array subscript, the result isn't REALLY a reference, but non-intrinsic functions expect a reference: take address
-							PRINT(
-								std::cerr << "===is intrinsic arg in non-intrinsic call - adding address" << std::endl;
-							)
-							arg = new AddressExpr( arg );
-						} else if ( function->get_linkage() == LinkageSpec::Intrinsic && arg->result->referenceDepth() != 0 ) {
+						// if ( function->get_linkage() != LinkageSpec::Intrinsic && isIntrinsicReference( arg ) ) {
+						// 	// if argument is dereference or array subscript, the result isn't REALLY a reference, but non-intrinsic functions expect a reference: take address
+						// 	// PRINT(
+						// 		std::cerr << "===is intrinsic arg in non-intrinsic call - adding address" << std::endl;
+						// 	// )
+						// 	arg = new AddressExpr( arg );
+						// } else
+						// if ( function->get_linkage() == LinkageSpec::Intrinsic && arg->result->referenceDepth() != 0 ) {
+						if ( function->get_linkage() == LinkageSpec::Intrinsic && InitTweak::getPointerBase( arg->result ) ) {
+
+							// needed for definition of prelude functions, etc.
+
 							// argument is a 'real' reference, but function expects a C lvalue: add a dereference to the reference-typed argument
 							PRINT(
@@ -221,7 +226,7 @@
 							PointerType * ptrType = new PointerType( Type::Qualifiers(), baseType->clone() );
 							delete arg->result;
-							arg->set_result( ptrType );
+							arg->result = ptrType;
 							arg = mkDeref( arg );
-							assertf( arg->result->referenceDepth() == 0, "Reference types should have been eliminated from intrinsic function calls, but weren't: %s", toCString( arg->result ) );
+							// assertf( arg->result->referenceDepth() == 0, "Reference types should have been eliminated from intrinsic function calls, but weren't: %s", toCString( arg->result ) );
 						}
 					}
