Index: src/GenPoly/Specialize.cc
===================================================================
--- src/GenPoly/Specialize.cc	(revision a56767c553787fe4920170c20ffd7e869a093d76)
+++ src/GenPoly/Specialize.cc	(revision f1e012b7aa1aaea6aa2dde9bcb3b0e83dcf13824)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Specialize.cc -- 
+// Specialize.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Rob Schluntz
-// Last Modified On : Tue Sep 22 14:04:13 2015
-// Update Count     : 15
+// Last Modified On : Tue Jan 19 10:40:37 2016
+// Update Count     : 23
 //
 
@@ -140,6 +140,7 @@
 		return new AddressExpr( new VariableExpr( thunkFunc ) );
 	}
-	
+
 	Expression * Specialize::doSpecialization( Type *formalType, Expression *actual, InferredParams *inferParams ) {
+		assert( actual->get_results().size() >= 1 ); // using front, should have this assert
 		if ( needsSpecialization( formalType, actual->get_results().front(), env ) ) {
 			FunctionType *funType;
@@ -197,4 +198,5 @@
 
 	Expression * Specialize::mutate( CastExpr *castExpr ) {
+		assert( castExpr->get_results().size() >= 1 && "Check that functions with void return aren't returning a value" );
 		castExpr->get_arg()->acceptMutator( *this );
 		Expression *specialized = doSpecialization( castExpr->get_results().front(), castExpr->get_arg() );
