Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision c19edd15735decafa879b4d91a601aead4397b7e)
+++ src/GenPoly/Box.cc	(revision 332218007391c23d4a807d5dd8fd971a15d3efb8)
@@ -1277,5 +1277,6 @@
 			FunctionType * ftype = functionDecl->type;
 			if ( ! ftype->returnVals.empty() && functionDecl->statements ) {
-				if ( ! isPrefix( functionDecl->name, "_thunk" ) && ! isPrefix( functionDecl->name, "_adapter" ) ) { // xxx - remove check for prefix once thunks properly use ctor/dtors
+				// intrinsic functions won't be using the _retval so no need to generate it.
+				if ( functionDecl->linkage != LinkageSpec::Intrinsic && !isPrefix( functionDecl->name, "_thunk" ) && ! isPrefix( functionDecl->name, "_adapter" ) ) { // xxx - remove check for prefix once thunks properly use ctor/dtors
 					assert( ftype->returnVals.size() == 1 );
 					DeclarationWithType * retval = ftype->returnVals.front();
