Index: src/MakeLibCfa.cc
===================================================================
--- src/MakeLibCfa.cc	(revision 6e206cb61aa9a135c29ec45c7a2e86503d93a644)
+++ src/MakeLibCfa.cc	(revision 0b150eccb21118c3e0226446011f3008a38293e5)
@@ -75,25 +75,8 @@
 		  case CodeGen::OT_POSTFIXASSIGN:
 		  case CodeGen::OT_INFIXASSIGN:
+		  case CodeGen::OT_CTOR:
+		  case CodeGen::OT_DTOR:
 				funcDecl->get_statements()->get_kids().push_back( new ReturnStmt( std::list< Label >(), newExpr ) );
 				break;
-		  case CodeGen::OT_CTOR:
-		  	// ctors don't return a value
-		  	if ( funcDecl->get_functionType()->get_parameters().size() == 1 ) {
-		  		// intrinsic default constructors should do nothing
-		  		// delete newExpr;
-		  		break;
-		  	} else {
-		  		assert( funcDecl->get_functionType()->get_parameters().size() == 2 );
-		  		// anything else is a single parameter constructor that is effectively a C-style assignment
-		  		// delete newExpr->get_function();
-		  		assert(newExpr->get_args().size()==2);
-		  		newExpr->set_function( new NameExpr( "?=?" ) );
-			  	funcDecl->get_statements()->get_kids().push_back( new ExprStmt( std::list< Label >(), newExpr ) );
-		  	}
-		  	break;
-		  case CodeGen::OT_DTOR:
-		  	// intrinsic destructors should do nothing
-		  	// delete newExpr;
-		  	break;
 		  case CodeGen::OT_CONSTANT:
 		  case CodeGen::OT_LABELADDRESS:
Index: src/ResolvExpr/CastCost.cc
===================================================================
--- src/ResolvExpr/CastCost.cc	(revision 6e206cb61aa9a135c29ec45c7a2e86503d93a644)
+++ src/ResolvExpr/CastCost.cc	(revision 0b150eccb21118c3e0226446011f3008a38293e5)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// CastCost.cc -- 
+// CastCost.cc --
 //
 // Author           : Richard C. Bilson
@@ -26,5 +26,5 @@
 	  public:
 		CastCost( Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env );
-  
+
 		virtual void visit( BasicType *basicType );
 		virtual void visit( PointerType *pointerType );
@@ -36,5 +36,9 @@
 			NamedTypeDecl *namedType;
 			if ( env.lookup( destAsTypeInst->get_name(), eqvClass ) ) {
-				return castCost( src, eqvClass.type, indexer, env );
+				if ( eqvClass.type ) {
+					return castCost( src, eqvClass.type, indexer, env );
+				} else {
+					return Cost::infinity;
+				}
 			} else if ( ( namedType = indexer.lookupType( destAsTypeInst->get_name() ) ) ) {
 				TypeDecl *type = dynamic_cast< TypeDecl* >( namedType );
Index: src/ResolvExpr/ConversionCost.cc
===================================================================
--- src/ResolvExpr/ConversionCost.cc	(revision 6e206cb61aa9a135c29ec45c7a2e86503d93a644)
+++ src/ResolvExpr/ConversionCost.cc	(revision 0b150eccb21118c3e0226446011f3008a38293e5)
@@ -30,5 +30,9 @@
 ///     std::cout << "type inst " << destAsTypeInst->get_name();
 			if ( env.lookup( destAsTypeInst->get_name(), eqvClass ) ) {
-				return conversionCost( src, eqvClass.type, indexer, env );
+				if ( eqvClass.type ) {
+					return conversionCost( src, eqvClass.type, indexer, env );
+				} else {
+					return Cost::infinity;
+				}
 			} else if ( ( namedType = indexer.lookupType( destAsTypeInst->get_name() ) ) ) {
 ///       std::cout << " found" << std::endl;
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision 6e206cb61aa9a135c29ec45c7a2e86503d93a644)
+++ src/ResolvExpr/Resolver.cc	(revision 0b150eccb21118c3e0226446011f3008a38293e5)
@@ -124,5 +124,5 @@
 			} // if
 #endif
-			assert( finder.get_alternatives().size() == 1 );
+			assertf( finder.get_alternatives().size() == 1, "findSingleExpression: must have exactly one alternative at the end." );
 			Alternative &choice = finder.get_alternatives().front();
 			Expression *newExpr = choice.expr->clone();
@@ -397,5 +397,5 @@
 			// // 	cerr << type << endl;
 			// // } // for
-			
+
 			// // O(N^2) checks of d-types with f-types
 			// // find the minimum cost
Index: src/ResolvExpr/Unify.cc
===================================================================
--- src/ResolvExpr/Unify.cc	(revision 6e206cb61aa9a135c29ec45c7a2e86503d93a644)
+++ src/ResolvExpr/Unify.cc	(revision 0b150eccb21118c3e0226446011f3008a38293e5)
@@ -344,5 +344,5 @@
 		std::cerr << "unifyInexact type 1 is ";
 		type1->print( std::cerr );
-		std::cerr << "type 2 is ";
+		std::cerr << " type 2 is ";
 		type2->print( std::cerr );
 		std::cerr << std::endl;
@@ -595,5 +595,5 @@
 			TypeExpr *otherParam = dynamic_cast< TypeExpr* >(*jt);
 			assertf(otherParam, "Aggregate parameters should be type expressions");
-			
+
 			Type* paramTy = param->get_type();
 			Type* otherParamTy = otherParam->get_type();
Index: src/SymTab/FixFunction.cc
===================================================================
--- src/SymTab/FixFunction.cc	(revision 6e206cb61aa9a135c29ec45c7a2e86503d93a644)
+++ src/SymTab/FixFunction.cc	(revision 0b150eccb21118c3e0226446011f3008a38293e5)
@@ -24,6 +24,8 @@
 
 	DeclarationWithType * FixFunction::mutate(FunctionDecl *functionDecl) {
-		ObjectDecl *pointer = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClasses(), functionDecl->get_linkage(), 0, new PointerType( Type::Qualifiers(), functionDecl->get_type()->clone() ), 0, functionDecl->get_attributes() );
+		ObjectDecl *pointer = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClasses(), functionDecl->get_linkage(), 0, new PointerType( Type::Qualifiers(), functionDecl->get_type() ), 0, functionDecl->get_attributes() );
 		functionDecl->get_attributes().clear();
+		// can't delete function type because it may contain assertions, but can't transfer ownership without a clone since set_type checks for nullptr
+		functionDecl->set_type( functionDecl->get_type()->clone() );
 		delete functionDecl;
 		return pointer;
Index: src/Tuples/TupleExpansion.cc
===================================================================
--- src/Tuples/TupleExpansion.cc	(revision 6e206cb61aa9a135c29ec45c7a2e86503d93a644)
+++ src/Tuples/TupleExpansion.cc	(revision 0b150eccb21118c3e0226446011f3008a38293e5)
@@ -332,5 +332,5 @@
 	TypeInstType * isTtype( Type * type ) {
 		if ( TypeInstType * inst = dynamic_cast< TypeInstType * >( type ) ) {
-			if ( inst->get_baseType()->get_kind() == TypeDecl::Ttype ) {
+			if ( inst->get_baseType() && inst->get_baseType()->get_kind() == TypeDecl::Ttype ) {
 				return inst;
 			}
Index: src/prelude/prelude.cf
===================================================================
--- src/prelude/prelude.cf	(revision 6e206cb61aa9a135c29ec45c7a2e86503d93a644)
+++ src/prelude/prelude.cf	(revision 0b150eccb21118c3e0226446011f3008a38293e5)
@@ -309,12 +309,12 @@
 // forall( dtype DT ) signed int ?!=?( const volatile void *, const volatile DT * );
 
-// forall( dtype DT ) signed int ?==?( const volatile DT *, forall( dtype DT2 )const DT2 * );
-// forall( dtype DT ) signed int ?==?( forall( dtype DT2 )const DT2 *, const volatile DT * );
-// forall( ftype FT ) signed int ?==?( FT *, forall( ftype FT2 )FT2 * );
-// forall( ftype FT ) signed int ?==?( forall( ftype FT2 )FT2 *, FT * );
-// forall( dtype DT ) signed int ?!=?( const volatile DT *, forall( dtype DT2 )const DT2 * );
-// forall( dtype DT ) signed int ?!=?( forall( dtype DT2 )const DT2 *, const volatile DT * );
-// forall( ftype FT ) signed int ?!=?( FT *, forall( ftype FT2 )FT2 * );
-// forall( ftype FT ) signed int ?!=?( forall( ftype FT2 )FT2 *, FT * );
+// forall( dtype DT ) signed int ?==?( const volatile DT *, zero_t );
+// forall( dtype DT ) signed int ?==?( zero_t, const volatile DT * );
+// forall( ftype FT ) signed int ?==?( FT *, zero_t );
+// forall( ftype FT ) signed int ?==?( zero_t, FT * );
+// forall( dtype DT ) signed int ?!=?( const volatile DT *, zero_t );
+// forall( dtype DT ) signed int ?!=?( zero_t, const volatile DT * );
+// forall( ftype FT ) signed int ?!=?( FT *, zero_t );
+// forall( ftype FT ) signed int ?!=?( zero_t, FT * );
 
 // ------------------------------------------------------------
@@ -447,15 +447,15 @@
 const volatile void *	?=?( const volatile void * volatile *, const volatile void * );
 
-//forall( dtype DT ) DT *			?=?(		    DT *	  *, forall( dtype DT2 ) const DT2 * );
-//forall( dtype DT ) DT *			?=?(		    DT * volatile *, forall( dtype DT2 ) const DT2 * );
-forall( dtype DT ) const DT *		?=?( const	    DT *	  *, forall( dtype DT2 ) const DT2 * );
-forall( dtype DT ) const DT *		?=?( const	    DT * volatile *, forall( dtype DT2 ) const DT2 * );
-//forall( dtype DT ) volatile DT *	?=?( volatile	    DT *	  *, forall( dtype DT2 ) const DT2 * );
-//forall( dtype DT ) volatile DT *	?=?( volatile	    DT * volatile *, forall( dtype DT2 ) const DT2 * );
-forall( dtype DT ) const volatile DT *	?=?( const volatile DT *	  *, forall( dtype DT2 ) const DT2 * );
-forall( dtype DT ) const volatile DT *	?=?( const volatile DT * volatile *, forall( dtype DT2 ) const DT2 * );
-
-forall( ftype FT ) FT *			?=?( FT *	   *, forall( ftype FT2 ) FT2 * );
-forall( ftype FT ) FT *			?=?( FT * volatile *, forall( ftype FT2 ) FT2 * );
+// //forall( dtype DT ) DT *			?=?(		    DT *	  *, zero_t );
+// //forall( dtype DT ) DT *			?=?(		    DT * volatile *, zero_t );
+// forall( dtype DT ) const DT *		?=?( const	    DT *	  *, zero_t );
+// forall( dtype DT ) const DT *		?=?( const	    DT * volatile *, zero_t );
+// //forall( dtype DT ) volatile DT *	?=?( volatile	    DT *	  *, zero_t );
+// //forall( dtype DT ) volatile DT *	?=?( volatile	    DT * volatile *,  );
+// forall( dtype DT ) const volatile DT *	?=?( const volatile DT *	  *, zero_t );
+// forall( dtype DT ) const volatile DT *	?=?( const volatile DT * volatile *, zero_t );
+
+// forall( ftype FT ) FT *			?=?( FT *	   *, zero_t );
+// forall( ftype FT ) FT *			?=?( FT * volatile *, zero_t );
 
 forall( dtype T | sized(T) ) T *			?+=?(		     T *	  *, ptrdiff_t );
@@ -799,12 +799,12 @@
 void 	?{}( const volatile void *	    *, const volatile void * );
 
-//forall( dtype DT ) void ?{}(		    DT *	  *, forall( dtype DT2 ) const DT2 * );
-//forall( dtype DT ) void ?{}(		    DT * volatile *, forall( dtype DT2 ) const DT2 * );
-forall( dtype DT ) void ?{}( const	    DT *	  *, forall( dtype DT2 ) const DT2 * );
-//forall( dtype DT ) void ?{}( volatile	    DT *	  *, forall( dtype DT2 ) const DT2 * );
-//forall( dtype DT ) void ?{}( volatile	    DT * volatile *, forall( dtype DT2 ) const DT2 * );
-forall( dtype DT ) void ?{}( const volatile DT *	  *, forall( dtype DT2 ) const DT2 * );
-
-forall( ftype FT ) void	?{}( FT *	   *, forall( ftype FT2 ) FT2 * );
+// //forall( dtype DT ) void ?{}(		    DT *	  *, zero_t );
+// //forall( dtype DT ) void ?{}(		    DT * volatile *, zero_t );
+// forall( dtype DT ) void ?{}( const	    DT *	  *, zero_t );
+// //forall( dtype DT ) void ?{}( volatile	    DT *	  *, zero_t );
+// //forall( dtype DT ) void ?{}( volatile	    DT * volatile *, zero_t );
+// forall( dtype DT ) void ?{}( const volatile DT *	  *, zero_t );
+
+// forall( ftype FT ) void	?{}( FT *	   *, zero_t );
 
 // default ctors
