Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/CodeGen/CodeGenerator.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// CodeGenerator.cc -- 
+// CodeGenerator.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan 25 21:22:00 2016
-// Update Count     : 242
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Feb 09 13:24:40 2016
+// Update Count     : 255
 //
 
@@ -98,5 +98,5 @@
 		handleStorageClass( objectDecl );
 		output << genType( objectDecl->get_type(), mangleName( objectDecl ) );
-	
+
 		if ( objectDecl->get_init() ) {
 			output << " = ";
@@ -112,5 +112,5 @@
 		if ( aggDecl->get_name() != "" )
 			output << aggDecl->get_name();
-	
+
 		std::list< Declaration * > &memb = aggDecl->get_members();
 
@@ -118,12 +118,12 @@
 			output << " {" << endl;
 
-			cur_indent += CodeGenerator::tabsize; 
+			cur_indent += CodeGenerator::tabsize;
 			for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
-				output << indent; 
+				output << indent;
 				(*i)->accept( *this );
 				output << ";" << endl;
 			}
 
-			cur_indent -= CodeGenerator::tabsize; 
+			cur_indent -= CodeGenerator::tabsize;
 
 			output << indent << "}";
@@ -140,5 +140,5 @@
 		handleAggregate( aggregateDecl );
 	}
-  
+
 	void CodeGenerator::visit( EnumDecl *aggDecl ) {
 		output << "enum ";
@@ -146,5 +146,5 @@
 		if ( aggDecl->get_name() != "" )
 			output << aggDecl->get_name();
-	
+
 		std::list< Declaration* > &memb = aggDecl->get_members();
 
@@ -152,9 +152,9 @@
 			output << " {" << endl;
 
-			cur_indent += CodeGenerator::tabsize; 
+			cur_indent += CodeGenerator::tabsize;
 			for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
 				ObjectDecl *obj = dynamic_cast< ObjectDecl* >( *i );
 				assert( obj );
-				output << indent << mangleName( obj ); 
+				output << indent << mangleName( obj );
 				if ( obj->get_init() ) {
 					output << " = ";
@@ -164,17 +164,17 @@
 			} // for
 
-			cur_indent -= CodeGenerator::tabsize; 
+			cur_indent -= CodeGenerator::tabsize;
 
 			output << indent << "}";
 		} // if
 	}
-  
+
 	void CodeGenerator::visit( ContextDecl *aggregateDecl ) {}
-  
+
 	void CodeGenerator::visit( TypedefDecl *typeDecl ) {
 		output << "typedef ";
 		output << genType( typeDecl->get_base(), typeDecl->get_name() );
 	}
-  
+
 	void CodeGenerator::visit( TypeDecl *typeDecl ) {
 		// really, we should mutate this into something that isn't a TypeDecl but that requires large-scale changes,
@@ -216,5 +216,5 @@
 	}
 
-	void CodeGenerator::visit( Constant *constant ) { 
+	void CodeGenerator::visit( Constant *constant ) {
 		output << constant->get_value() ;
 	}
@@ -233,5 +233,5 @@
 						assert( arg != applicationExpr->get_args().end() );
 						if ( AddressExpr *addrExpr = dynamic_cast< AddressExpr * >( *arg ) ) {
-	        
+
 							*arg = addrExpr->get_arg();
 						} else {
@@ -242,10 +242,10 @@
 						break;
 					}
-	      
+
 				  default:
 					// do nothing
 					;
 				}
-	    
+
 				switch ( opInfo.type ) {
 				  case OT_INDEX:
@@ -256,10 +256,20 @@
 					output << "]";
 					break;
-	      
+
 				  case OT_CALL:
-					// there are no intrinsic definitions of the function call operator
+					// there are no intrinsic definitions of the function call operator or constructors or destructors
 					assert( false );
 					break;
-	      
+
+				  case OT_CTOR:
+				  // intrinsic constructors should never be called directly - they should be transformed back into Initializer nodes
+				  assert(false);
+				  break;
+
+				  case OT_DTOR:
+				  // intrinsic destructors do nothing - don't generate any code
+				  output << " // " << dynamic_cast<VariableExpr*>(applicationExpr->get_function())->get_var()->get_name() << endl;
+				  break;
+
 				  case OT_PREFIX:
 				  case OT_PREFIXASSIGN:
@@ -270,5 +280,5 @@
 					output << ")";
 					break;
-	      
+
 				  case OT_POSTFIX:
 				  case OT_POSTFIXASSIGN:
@@ -277,4 +287,5 @@
 					output << opInfo.symbol;
 					break;
+
 
 				  case OT_INFIX:
@@ -287,5 +298,5 @@
 					output << ")";
 					break;
-	      
+
 				  case OT_CONSTANT:
 				  case OT_LABELADDRESS:
@@ -306,5 +317,5 @@
 		} // if
 	}
-  
+
 	void CodeGenerator::visit( UntypedExpr *untypedExpr ) {
 		if ( NameExpr *nameExpr = dynamic_cast< NameExpr* >( untypedExpr->get_function() ) ) {
@@ -320,9 +331,14 @@
 					output << "]";
 					break;
-	      
+
 				  case OT_CALL:
 					assert( false );
-					break;
-	      
+
+					case OT_CTOR:
+					case OT_DTOR:
+					// intrinsic constructors should never be called
+					// intrinsic destructors do nothing
+					break;
+
 				  case OT_PREFIX:
 				  case OT_PREFIXASSIGN:
@@ -334,5 +350,5 @@
 					output << ")";
 					break;
-	      
+
 				  case OT_POSTFIX:
 				  case OT_POSTFIXASSIGN:
@@ -341,5 +357,5 @@
 					output << opInfo.symbol;
 					break;
-  
+
 				  case OT_INFIX:
 				  case OT_INFIXASSIGN:
@@ -351,5 +367,5 @@
 					output << ")";
 					break;
-					
+
 				  case OT_CONSTANT:
 					// there are no intrinsic definitions of 0 or 1 as functions
@@ -369,5 +385,5 @@
 		} // if
 	}
-  
+
 	void CodeGenerator::visit( NameExpr *nameExpr ) {
 		OperatorInfo opInfo;
@@ -379,5 +395,5 @@
 		} // if
 	}
-  
+
 	void CodeGenerator::visit( AddressExpr *addressExpr ) {
 		output << "(&";
@@ -408,14 +424,14 @@
 		output << ")";
 	}
-  
+
 	void CodeGenerator::visit( UntypedMemberExpr *memberExpr ) {
 		assert( false );
 	}
-  
+
 	void CodeGenerator::visit( MemberExpr *memberExpr ) {
 		memberExpr->get_aggregate()->accept( *this );
 		output << "." << mangleName( memberExpr->get_member() );
 	}
-  
+
 	void CodeGenerator::visit( VariableExpr *variableExpr ) {
 		OperatorInfo opInfo;
@@ -426,10 +442,10 @@
 		} // if
 	}
-  
+
 	void CodeGenerator::visit( ConstantExpr *constantExpr ) {
 		assert( constantExpr->get_constant() );
 		constantExpr->get_constant()->accept( *this );
 	}
-  
+
 	void CodeGenerator::visit( SizeofExpr *sizeofExpr ) {
 		output << "sizeof(";
@@ -464,5 +480,5 @@
 		output << ")";
 	}
-  
+
 	void CodeGenerator::visit( LogicalExpr *logicalExpr ) {
 		output << "(";
@@ -476,5 +492,5 @@
 		output << ")";
 	}
-  
+
 	void CodeGenerator::visit( ConditionalExpr *conditionalExpr ) {
 		output << "(";
@@ -486,5 +502,5 @@
 		output << ")";
 	}
-  
+
 	void CodeGenerator::visit( CommaExpr *commaExpr ) {
 		output << "(";
@@ -494,7 +510,7 @@
 		output << ")";
 	}
-  
+
 	void CodeGenerator::visit( TupleExpr *tupleExpr ) {}
-  
+
 	void CodeGenerator::visit( TypeExpr *typeExpr ) {}
 
@@ -527,5 +543,5 @@
 			}
 		}
-		cur_indent -= CodeGenerator::tabsize; 
+		cur_indent -= CodeGenerator::tabsize;
 
 		output << indent << "}";
@@ -533,6 +549,6 @@
 
 	void CodeGenerator::visit( ExprStmt *exprStmt ) {
-		// I don't see why this check is necessary. 
-		// If this starts to cause problems then put it back in, 
+		// I don't see why this check is necessary.
+		// If this starts to cause problems then put it back in,
 		// with an explanation
 		assert( exprStmt );
@@ -584,5 +600,5 @@
 		switchStmt->get_condition()->accept( *this );
 		output << " ) ";
-		
+
 		output << "{" << std::endl;
 		cur_indent += CodeGenerator::tabsize;
@@ -604,5 +620,5 @@
 		} // if
 		output << ":\n";
-		
+
 		std::list<Statement *> sts = caseStmt->get_statements();
 
@@ -621,5 +637,5 @@
 			if ( ! branchStmt->get_target().empty() )
 				output << "goto " << branchStmt->get_target();
-			else { 
+			else {
 				if ( branchStmt->get_computedTarget() != 0 ) {
 					output << "goto *";
@@ -672,6 +688,6 @@
 
 	void CodeGenerator::visit( ForStmt *forStmt ) {
-		// initialization is always hoisted, so don't 
-		// bother doing anything with that 
+		// initialization is always hoisted, so don't
+		// bother doing anything with that
 		output << "for (;";
 
@@ -697,5 +713,5 @@
 	void CodeGenerator::visit( DeclStmt *declStmt ) {
 		declStmt->get_decl()->accept( *this );
-	
+
 		if ( doSemicolon( declStmt->get_decl() ) ) {
 			output << ";";
Index: src/CodeGen/OperatorTable.cc
===================================================================
--- src/CodeGen/OperatorTable.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/CodeGen/OperatorTable.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jun 23 17:41:14 2015
-// Update Count     : 5
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Oct 06 15:26:34 2015
+// Update Count     : 9
 //
 
@@ -21,4 +21,6 @@
 		const OperatorInfo tableValues[] = {
 			{	"?[?]",		"",		"_operator_index",				OT_INDEX			},
+			{	"?{}",		"",		"_constructor",					OT_CTOR				},
+			{	"^?{}",		"",		"_destructor",					OT_DTOR				}, // ~?{}, -?{}, !?{}, $?{}, ??{}, ^?{}, ?destroy, ?delete
 			{	"?()",		"",		"_operator_call",				OT_CALL				},
 			{	"?++",		"++",	"_operator_postincr",			OT_POSTFIXASSIGN	},
Index: src/CodeGen/OperatorTable.h
===================================================================
--- src/CodeGen/OperatorTable.h	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/CodeGen/OperatorTable.h	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jun 23 16:09:27 2015
-// Update Count     : 3
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Jun 24 16:17:57 2015
+// Update Count     : 5
 //
 
@@ -22,4 +22,6 @@
 	enum OperatorType {
 		OT_INDEX,
+		OT_CTOR,
+		OT_DTOR,
 		OT_CALL,
 		OT_PREFIX,
Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/GenPoly/Box.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Feb  5 16:45:07 2016
-// Update Count     : 286
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Feb 09 14:39:52 2016
+// Update Count     : 295
 //
 
@@ -372,4 +372,5 @@
 
 		Expression *Pass1::makeOffsetArray( StructInstType *ty ) {
+			std::list<Expression*> noDesignators;
 			std::list< Declaration* > &baseMembers = ty->get_baseStruct()->get_members();
 
@@ -390,7 +391,7 @@
 					memberDecl = new ObjectDecl( (*member)->get_name(), DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, offsetType->clone(), 0 );
 				}
-				inits.push_back( new SingleInit( new OffsetofExpr( ty->clone(), memberDecl ) ) );
+				inits.push_back( new SingleInit( new OffsetofExpr( ty->clone(), memberDecl ), noDesignators ) );
 			}
-			arrayTemp->set_init( new ListInit( inits ) );
+			arrayTemp->set_init( new ListInit( inits, noDesignators ) );
 
 			// return variable pointing to temporary
@@ -1282,5 +1283,5 @@
 
 					std::list<Expression*> designators;
-					objectDecl->set_init( new SingleInit( alloc, designators ) );
+					objectDecl->set_init( new SingleInit( alloc, designators, false ) ); // not constructed
 				}
 			}
@@ -1322,5 +1323,5 @@
 			return derefdVar;
 		}
-		
+
 		Expression *MemberExprFixer::mutate( MemberExpr *memberExpr ) {
 			// mutate, exiting early if no longer MemberExpr
Index: src/GenPoly/Specialize.cc
===================================================================
--- src/GenPoly/Specialize.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/GenPoly/Specialize.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Rob Schluntz
-// Last Modified On : Wed Jan 20 12:40:33 2016
-// Update Count     : 18
+// Last Modified On : Wed Jan 20 13:00:00 2016
+// Update Count     : 24
 //
 
@@ -142,5 +142,5 @@
 
 	Expression * Specialize::doSpecialization( Type *formalType, Expression *actual, InferredParams *inferParams ) {
-		assert( ! actual->get_results().empty() );
+		assert( ! actual->get_results().empty() ); // using front, should have this assert
 		if ( needsSpecialization( formalType, actual->get_results().front(), env ) ) {
 			FunctionType *funType;
Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
+++ src/InitTweak/FixInit.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -0,0 +1,101 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FixInit.h --
+//
+// Author           : Rob Schluntz
+// Created On       : Wed Jan 13 16:29:30 2016
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Jan 19 16:36:59 2016
+// Update Count     : 30
+//
+
+#include <stack>
+#include <list>
+#include "RemoveInit.h"
+#include "SynTree/Declaration.h"
+#include "SynTree/Type.h"
+#include "SynTree/Expression.h"
+#include "SynTree/Statement.h"
+#include "SynTree/Initializer.h"
+#include "SynTree/Mutator.h"
+#include "GenPoly/PolyMutator.h"
+
+namespace InitTweak {
+	namespace {
+		const std::list<Label> noLabels;
+	}
+
+	class FixInit : public GenPoly::PolyMutator {
+	  public:
+		static void fixInitializers( std::list< Declaration * > &translationUnit );
+
+		virtual ObjectDecl * mutate( ObjectDecl *objDecl );
+
+		virtual CompoundStmt * mutate( CompoundStmt * compoundStmt );
+	};
+
+	void fix( std::list< Declaration * > & translationUnit ) {
+		FixInit::fixInitializers( translationUnit );
+	}
+
+	void FixInit::fixInitializers( std::list< Declaration * > & translationUnit ) {
+		FixInit fixer;
+		mutateAll( translationUnit, fixer );
+	}
+
+	// in the case where an object has an initializer and a polymorphic type, insert an assignment immediately after the
+	// declaration. This will (seemingly) cause the later phases to do the right thing with the assignment
+	ObjectDecl *FixInit::mutate( ObjectDecl *objDecl ) {
+		if ( ConstructorInit * ctorInit = dynamic_cast< ConstructorInit * >( objDecl->get_init() ) ) {
+			// a decision should have been made by the resolver, so ctor and init are not both non-NULL
+			assert( ! ctorInit->get_ctor() || ! ctorInit->get_init() );
+			if ( Expression * ctor = ctorInit->get_ctor() ) {
+				ExprStmt * ctorStmt = new ExprStmt( noLabels, ctor );
+				stmtsToAddAfter.push_back( ctorStmt );
+				objDecl->set_init( NULL );
+				ctorInit->set_ctor( NULL );
+			} else if ( Initializer * init = ctorInit->get_init() ) {
+				objDecl->set_init( init );
+				ctorInit->set_init( NULL );
+			} else {
+				// no constructor and no initializer, which is okay
+				objDecl->set_init( NULL );
+			}
+			delete ctorInit;
+		}
+		return objDecl;
+	}
+
+	CompoundStmt * FixInit::mutate( CompoundStmt * compoundStmt ) {
+		std::list< Statement * > & statements = compoundStmt->get_kids();
+		for ( std::list< Statement * >::iterator it = statements.begin(); it != statements.end(); ) {
+			// remove if instrinsic destructor statement
+			// xxx - test user manually calling intrinsic functions - what happens?
+			if ( ExprStmt * exprStmt = dynamic_cast< ExprStmt * >( *it ) ) {
+				if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( exprStmt->get_expr() ) ) {
+					if ( VariableExpr * function = dynamic_cast< VariableExpr * >( appExpr->get_function() ) ) {
+						if ( function->get_var()->get_name() == "^?{}" && function->get_var()->get_linkage() == LinkageSpec::Intrinsic ) {
+							statements.erase(it++);
+							continue;
+						} else {
+						}
+					}
+				}
+			}
+			++it;
+		}
+		// mutate non-destructor statements
+		return PolyMutator::mutate( compoundStmt );
+	}
+
+} // namespace InitTweak
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/InitTweak/FixInit.h
===================================================================
--- src/InitTweak/FixInit.h	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
+++ src/InitTweak/FixInit.h	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -0,0 +1,38 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FixInit.h --
+//
+// Author           : Rob Schluntz
+// Created On       : Wed Jan 13 16:29:30 2016
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Jan 13 16:31:13 2016
+// Update Count     : 5
+//
+
+#ifndef FIX_INIT_H
+#define FIX_INIT_H
+
+#include <string>
+#include <list>
+
+#include "SynTree/SynTree.h"
+#include "SynTree/Declaration.h"
+#include "SynTree/Mutator.h"
+
+namespace InitTweak {
+  /// replace constructor initializers with expression statements
+  /// and unwrap basic C-style initializers
+	void fix( std::list< Declaration * > & translationUnit );
+} // namespace
+
+#endif // GENPOLY_POLYMUTATOR_H
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/InitTweak/InitModel.cc
===================================================================
--- src/InitTweak/InitModel.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/InitTweak/InitModel.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// InitModel.cc -- 
+// InitModel.cc --
 //
 // Author           : Rodolfo G. Esteves
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue May 19 16:37:08 2015
-// Update Count     : 1
+// Last Modified By : Rob Schluntz
+// Last Modified On : Thu Jan 07 13:38:46 2016
+// Update Count     : 5
 //
 
@@ -198,5 +198,5 @@
 		assert(init == 0 && single != 0);
 		std::list< Expression * > empty;
-		init = new SingleInit( single->get_expr(), empty );
+		init = new SingleInit( single->get_expr(), empty, false ); // cannot be constructed
 		return;
 	}
@@ -214,5 +214,6 @@
 			} // if
 
-		init = new ListInit( contents );
+		std::list< Expression * > desig;
+		init = new ListInit( contents, desig, false ); // cannot be constructed
 		return;
 	}
Index: src/InitTweak/RemoveInit.cc
===================================================================
--- src/InitTweak/RemoveInit.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/InitTweak/RemoveInit.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,13 +5,15 @@
 // file "LICENCE" distributed with Cforall.
 //
-// RemoveInit.cc -- 
+// RemoveInit.cc --
 //
 // Author           : Rob Schluntz
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Dec 15 15:37:26 2015
-// Update Count     : 15
-//
-
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Feb 09 15:12:29 2016
+// Update Count     : 166
+//
+
+#include <stack>
+#include <list>
 #include "RemoveInit.h"
 #include "SynTree/Declaration.h"
@@ -21,4 +23,5 @@
 #include "SynTree/Initializer.h"
 #include "SynTree/Mutator.h"
+#include "GenPoly/PolyMutator.h"
 
 namespace InitTweak {
@@ -26,20 +29,21 @@
 		const std::list<Label> noLabels;
 	}
-	
-	class RemoveInit : public Mutator {
+
+	class RemoveInit : public GenPoly::PolyMutator {
 	  public:
+		/// removes and replaces initialization for polymorphic value objects
+		/// with assignment (TODO: constructor) statements.
+		/// also consistently allocates a temporary variable for the return value
+		/// of a function so that anything which the resolver decides can be assigned
+		/// into the return type of a function can be returned.
+		static void removeInitializers( std::list< Declaration * > &translationUnit );
+
 		RemoveInit();
-		virtual ObjectDecl * mutate(ObjectDecl *objDecl);
+		virtual ObjectDecl * mutate( ObjectDecl *objDecl );
 		virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );
 
 		virtual Statement * mutate( ReturnStmt * returnStmt );
-		
-		virtual CompoundStmt * mutate(CompoundStmt * compoundStmt);
-		
+
 	  protected:
-		std::list< Statement* > stmtsToAddBefore;
-		std::list< Statement* > stmtsToAddAfter;
-		void mutateStatementList( std::list< Statement* > &statements );
-
 		std::list<DeclarationWithType*> returnVals;
 		UniqueName tempNamer;
@@ -47,5 +51,38 @@
 	};
 
-	void tweak( std::list< Declaration * > translationUnit ) {
+	class CtorDtor : public GenPoly::PolyMutator {
+	  public:
+		/// create constructor and destructor statements for object declarations.
+		/// Destructors are inserted directly into the code, whereas constructors
+		/// will be added in after the resolver has run so that the initializer expression
+		/// is only removed if a constructor is found
+		static void generateCtorDtor( std::list< Declaration * > &translationUnit );
+
+		CtorDtor() : inFunction( false ) {}
+
+		virtual ObjectDecl * mutate( ObjectDecl * );
+		virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );
+		virtual Declaration* mutate( StructDecl *aggregateDecl );
+		virtual Declaration* mutate( UnionDecl *aggregateDecl );
+		virtual Declaration* mutate( EnumDecl *aggregateDecl );
+		virtual Declaration* mutate( ContextDecl *aggregateDecl );
+		virtual TypeDecl* mutate( TypeDecl *typeDecl );
+		virtual Declaration* mutate( TypedefDecl *typeDecl );
+
+		virtual CompoundStmt * mutate( CompoundStmt * compoundStmt );
+
+	  protected:
+		bool inFunction;
+
+		// to be added before block ends - use push_front so order is correct
+		std::list< Statement * > destructorStmts;
+	};
+
+	void tweak( std::list< Declaration * > & translationUnit ) {
+		RemoveInit::removeInitializers( translationUnit );
+		CtorDtor::generateCtorDtor( translationUnit );
+	}
+
+	void RemoveInit::removeInitializers( std::list< Declaration * > & translationUnit ) {
 		RemoveInit remover;
 		mutateAll( translationUnit, remover );
@@ -53,24 +90,4 @@
 
 	RemoveInit::RemoveInit() : tempNamer( "_retVal" ) {}
-	
-	void RemoveInit::mutateStatementList( std::list< Statement* > &statements ) {
-		for ( std::list< Statement* >::iterator i = statements.begin(); i != statements.end(); ++i ) {
-			if ( ! stmtsToAddAfter.empty() ) {
-				statements.splice( i, stmtsToAddAfter );
-			} // if
-			*i = (*i)->acceptMutator( *this );
-			if ( ! stmtsToAddBefore.empty() ) {
-				statements.splice( i, stmtsToAddBefore );
-			} // if
-		} // for
-		if ( ! stmtsToAddAfter.empty() ) {
-			statements.splice( statements.end(), stmtsToAddAfter );
-		} // if
-	}
-
-	CompoundStmt *RemoveInit::mutate(CompoundStmt *compoundStmt) {
-		mutateStatementList( compoundStmt->get_kids() );
-		return compoundStmt;
-	}
 
 	// in the case where an object has an initializer and a polymorphic type, insert an assignment immediately after the
@@ -79,5 +96,6 @@
 		if (objDecl->get_init() && dynamic_cast<TypeInstType*>(objDecl->get_type())) {
 			if (SingleInit * single = dynamic_cast<SingleInit*>(objDecl->get_init())) {
-				UntypedExpr *assign = new UntypedExpr( new NameExpr( "?=?" ) );
+				// xxx this can be more complicated - consider ListInit
+				UntypedExpr *assign = new UntypedExpr( new NameExpr( "?{}" ) );
 				assign->get_args().push_back( new AddressExpr (new NameExpr( objDecl->get_name() ) ) );
 				assign->get_args().push_back( single->get_value()->clone() );
@@ -93,12 +111,13 @@
 		// hands off if the function returns an lvalue - we don't want to allocate a temporary if a variable's address
 		// is being returned
+		// xxx - this should construct rather than assign
 		if ( returnStmt->get_expr() && returnVals.size() == 1 && funcName != "?=?" && ! returnVals.front()->get_type()->get_isLvalue()  ) {
 			ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::C, 0, returnVals.front()->get_type()->clone(), 0 );
-			stmtsToAddBefore.push_back( new DeclStmt( noLabels, newObj ) );
-			
+			stmtsToAdd.push_back( new DeclStmt( noLabels, newObj ) );
+
 			UntypedExpr *assign = new UntypedExpr( new NameExpr( "?=?" ) );
 			assign->get_args().push_back( new AddressExpr (new NameExpr( newObj->get_name() ) ) );
 			assign->get_args().push_back( returnStmt->get_expr() );
-			stmtsToAddBefore.push_back(new ExprStmt(noLabels, assign));
+			stmtsToAdd.push_back(new ExprStmt(noLabels, assign));
 
 			returnStmt->set_expr( new VariableExpr( newObj ) );
@@ -110,5 +129,5 @@
 		std::list<DeclarationWithType*> oldReturnVals = returnVals;
 		std::string oldFuncName = funcName;
-		
+
 		FunctionType * type = functionDecl->get_functionType();
 		returnVals = type->get_returnVals();
@@ -119,4 +138,105 @@
 		return decl;
 	}
+
+
+	void CtorDtor::generateCtorDtor( std::list< Declaration * > & translationUnit ) {
+		CtorDtor ctordtor;
+		mutateAll( translationUnit, ctordtor );
+	}
+
+	namespace {
+		bool tryConstruct( ObjectDecl * objDecl ) {
+			// xxx - handle designations
+			return ! LinkageSpec::isBuiltin( objDecl->get_linkage() ) &&
+	 			(objDecl->get_init() == NULL ||
+				( objDecl->get_init() != NULL && objDecl->get_init()->get_maybeConstructed() ));
+		}
+
+		Expression * makeCtorDtorExpr( std::string name, ObjectDecl * objDecl, std::list< Expression * > args ) {
+			UntypedExpr * expr = new UntypedExpr( new NameExpr( name ) );
+			expr->get_args().push_back( new AddressExpr( new VariableExpr( objDecl ) ) );
+			expr->get_args().splice( expr->get_args().end(), args );
+			return expr;
+		}
+
+		class InitExpander : public Visitor {
+		  public:
+		  InitExpander() {}
+		  // ~InitExpander() {}
+			virtual void visit( SingleInit * singleInit );
+			virtual void visit( ListInit * listInit );
+			std::list< Expression * > argList;
+		};
+
+		void InitExpander::visit( SingleInit * singleInit ) {
+			argList.push_back( singleInit->get_value()->clone() );
+		}
+
+		void InitExpander::visit( ListInit * listInit ) {
+			// xxx - for now, assume no nested list inits
+			std::list<Initializer*>::iterator it = listInit->begin_initializers();
+			for ( ; it != listInit->end_initializers(); ++it ) {
+				(*it)->accept( *this );
+			}
+		}
+
+		std::list< Expression * > makeInitList( Initializer * init ) {
+			InitExpander expander;
+			maybeAccept( init, expander );
+			return expander.argList;
+		}
+	}
+
+	ObjectDecl * CtorDtor::mutate( ObjectDecl * objDecl ) {
+		// hands off if designated or if @=
+		if ( tryConstruct( objDecl ) ) {
+			if ( inFunction ) {
+				Expression * ctor = makeCtorDtorExpr( "?{}", objDecl, makeInitList( objDecl->get_init() ) );
+				Expression * dtor = makeCtorDtorExpr( "^?{}", objDecl, std::list< Expression * >() );
+
+				// need to remember init expression, in case no ctors exist
+				// if ctor does exist, want to use ctor expression instead of init
+				// push this decision to the resolver
+				objDecl->set_init( new ConstructorInit( ctor, objDecl->get_init() ) );
+				destructorStmts.push_front( new ExprStmt( noLabels, dtor ) );
+			} else {
+				// xxx - find a way to construct/destruct globals
+				// hack: implicit "static" initialization routine for each struct type? or something similar?
+				// --ties into module system
+			}
+		}
+		return objDecl;
+	}
+
+	DeclarationWithType * CtorDtor::mutate( FunctionDecl *functionDecl ) {
+		// parameters should not be constructed and destructed, so don't mutate FunctionType
+		bool oldInFunc = inFunction;
+		mutateAll( functionDecl->get_oldDecls(), *this );
+		inFunction = true;
+		functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
+		inFunction = oldInFunc;
+		return functionDecl;
+	}
+
+	CompoundStmt * CtorDtor::mutate( CompoundStmt * compoundStmt ) {
+		CompoundStmt * ret = PolyMutator::mutate( compoundStmt );
+		std::list< Statement * > &statements = ret->get_kids();
+		if ( ! destructorStmts.empty() ) {
+			// TODO: adding to the end of a block isn't sufficient, since
+			// return/break/goto should trigger destructor when block is left.
+			statements.splice( statements.end(), destructorStmts );
+		} // if
+		return ret;
+	}
+
+	// should not traverse into any of these declarations to find objects
+	// that need to be constructed or destructed
+	Declaration* CtorDtor::mutate( StructDecl *aggregateDecl ) { return aggregateDecl; }
+	Declaration* CtorDtor::mutate( UnionDecl *aggregateDecl ) { return aggregateDecl; }
+	Declaration* CtorDtor::mutate( EnumDecl *aggregateDecl ) { return aggregateDecl; }
+	Declaration* CtorDtor::mutate( ContextDecl *aggregateDecl ) { return aggregateDecl; }
+	TypeDecl* CtorDtor::mutate( TypeDecl *typeDecl ) { return typeDecl; }
+	Declaration* CtorDtor::mutate( TypedefDecl *typeDecl ) { return typeDecl; }
+
 } // namespace InitTweak
 
Index: src/InitTweak/RemoveInit.h
===================================================================
--- src/InitTweak/RemoveInit.h	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/InitTweak/RemoveInit.h	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// RemoveInit.h -- 
+// RemoveInit.h --
 //
 // Author           : Rodolfo G. Esteves
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Nov 27 17:00:47 2015
-// Update Count     : 2
+// Last Modified By : Rob Schluntz
+// Last Modified On : Mon Jan 11 16:02:44 2016
+// Update Count     : 3
 //
 
@@ -26,6 +26,6 @@
 namespace InitTweak {
 	/// Adds assignment statements for polymorphic type initializers
-	void tweak( std::list< Declaration * > translationUnit );
-} // namespace 
+	void tweak( std::list< Declaration * > & translationUnit );
+} // namespace
 
 #endif // GENPOLY_POLYMUTATOR_H
Index: src/InitTweak/module.mk
===================================================================
--- src/InitTweak/module.mk	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/InitTweak/module.mk	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -11,8 +11,8 @@
 ## Created On       : Mon Jun  1 17:49:17 2015
 ## Last Modified By : Rob Schluntz
-## Last Modified On : Mon Jan 11 14:40:16 2016
-## Update Count     : 2
+## Last Modified On : Wed Jan 13 16:29:03 2016
+## Update Count     : 3
 ###############################################################################
 
-SRC += InitTweak/RemoveInit.cc
-
+SRC += InitTweak/RemoveInit.cc \
+	InitTweak/FixInit.cc
Index: src/MakeLibCfa.cc
===================================================================
--- src/MakeLibCfa.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/MakeLibCfa.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,12 +5,12 @@
 // file "LICENCE" distributed with Cforall.
 //
-// MakeLibCfa.cc -- 
+// MakeLibCfa.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Sat May 16 10:33:33 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jun 26 16:52:59 2015
-// Update Count     : 14
-// 
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Jan 19 13:20:26 2016
+// Update Count     : 40
+//
 
 #include "MakeLibCfa.h"
@@ -29,5 +29,5 @@
 		void visit( FunctionDecl* funcDecl );
 		void visit( ObjectDecl* objDecl );
-  
+
 		std::list< Declaration* > &get_newDecls() { return newDecls; }
 	  private:
@@ -43,5 +43,5 @@
 	void MakeLibCfa::visit( FunctionDecl* origFuncDecl ) {
 		if ( origFuncDecl->get_linkage() != LinkageSpec::Intrinsic ) return;
-  
+
 		FunctionDecl *funcDecl = origFuncDecl->clone();
 		CodeGen::OperatorInfo opInfo;
@@ -54,8 +54,14 @@
 		assert( param != funcDecl->get_functionType()->get_parameters().end() );
 
-		if ( (*param)->get_name() == "" ) {
-			(*param)->set_name( paramNamer.newName() );
-			(*param)->set_linkage( LinkageSpec::C );
-		} // if
+		for ( ; param != funcDecl->get_functionType()->get_parameters().end(); ++param ) {
+			if ( (*param)->get_name() == "" ) {
+				(*param)->set_name( paramNamer.newName() );
+				(*param)->set_linkage( LinkageSpec::C );
+			}
+			newExpr->get_args().push_back( new VariableExpr( *param ) );
+		} // for
+
+		funcDecl->set_statements( new CompoundStmt( std::list< Label >() ) );
+		newDecls.push_back( funcDecl );
 
 		switch ( opInfo.type ) {
@@ -65,16 +71,28 @@
 		  case CodeGen::OT_POSTFIX:
 		  case CodeGen::OT_INFIX:
-			newExpr->get_args().push_back( new VariableExpr( *param ) );
-			break;
 		  case CodeGen::OT_PREFIXASSIGN:
 		  case CodeGen::OT_POSTFIXASSIGN:
 		  case CodeGen::OT_INFIXASSIGN:
-			{
-				newExpr->get_args().push_back( new VariableExpr( *param ) );
-				// UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
-				// deref->get_args().push_back( new VariableExpr( *param ) );
-				// newExpr->get_args().push_back( deref );
+				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:
@@ -82,31 +100,14 @@
 			assert( false );
 		} // switch
-
-		for ( param++; param != funcDecl->get_functionType()->get_parameters().end(); ++param ) {
-			if ( (*param)->get_name() == "" ) {
-				(*param)->set_name( paramNamer.newName() );
-				(*param)->set_linkage( LinkageSpec::C );
-			}
-			newExpr->get_args().push_back( new VariableExpr( *param ) );
-		} // for
-		funcDecl->set_statements( new CompoundStmt( std::list< Label >() ) );
-		funcDecl->get_statements()->get_kids().push_back( new ReturnStmt( std::list< Label >(), newExpr ) );
-		newDecls.push_back( funcDecl );
 	}
 
 	void MakeLibCfa::visit( ObjectDecl* origObjDecl ) {
 		if ( origObjDecl->get_linkage() != LinkageSpec::Intrinsic ) return;
-  
+
 		ObjectDecl *objDecl = origObjDecl->clone();
 		assert( ! objDecl->get_init() );
 		std::list< Expression* > noDesignators;
-		objDecl->set_init( new SingleInit( new NameExpr( objDecl->get_name() ), noDesignators ) );
+		objDecl->set_init( new SingleInit( new NameExpr( objDecl->get_name() ), noDesignators, false ) ); // cannot be constructed
 		newDecls.push_back( objDecl );
 	}
 } // namespace LibCfa
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/Makefile.in
===================================================================
--- src/Makefile.in	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/Makefile.in	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -125,4 +125,5 @@
 	GenPoly/driver_cfa_cpp-DeclMutator.$(OBJEXT) \
 	InitTweak/driver_cfa_cpp-RemoveInit.$(OBJEXT) \
+	InitTweak/driver_cfa_cpp-FixInit.$(OBJEXT) \
 	Parser/driver_cfa_cpp-parser.$(OBJEXT) \
 	Parser/driver_cfa_cpp-lex.$(OBJEXT) \
@@ -348,6 +349,6 @@
 	GenPoly/CopyParams.cc GenPoly/FindFunction.cc \
 	GenPoly/InstantiateGeneric.cc GenPoly/DeclMutator.cc \
-	InitTweak/RemoveInit.cc Parser/parser.yy Parser/lex.ll \
-	Parser/TypedefTable.cc Parser/ParseNode.cc \
+	InitTweak/RemoveInit.cc InitTweak/FixInit.cc Parser/parser.yy \
+	Parser/lex.ll Parser/TypedefTable.cc Parser/ParseNode.cc \
 	Parser/DeclarationNode.cc Parser/ExpressionNode.cc \
 	Parser/StatementNode.cc Parser/InitializerNode.cc \
@@ -410,7 +411,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu src/Makefile
+	  $(AUTOMAKE) --foreign src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -568,4 +569,6 @@
 InitTweak/driver_cfa_cpp-RemoveInit.$(OBJEXT):  \
 	InitTweak/$(am__dirstamp) InitTweak/$(DEPDIR)/$(am__dirstamp)
+InitTweak/driver_cfa_cpp-FixInit.$(OBJEXT): InitTweak/$(am__dirstamp) \
+	InitTweak/$(DEPDIR)/$(am__dirstamp)
 Parser/parser.h: Parser/parser.cc
 	@if test ! -f $@; then rm -f Parser/parser.cc; else :; fi
@@ -800,4 +803,5 @@
 	-rm -f GenPoly/driver_cfa_cpp-ScrubTyVars.$(OBJEXT)
 	-rm -f GenPoly/driver_cfa_cpp-Specialize.$(OBJEXT)
+	-rm -f InitTweak/driver_cfa_cpp-FixInit.$(OBJEXT)
 	-rm -f InitTweak/driver_cfa_cpp-RemoveInit.$(OBJEXT)
 	-rm -f Parser/driver_cfa_cpp-DeclarationNode.$(OBJEXT)
@@ -907,4 +911,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-ScrubTyVars.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-Specialize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@InitTweak/$(DEPDIR)/driver_cfa_cpp-FixInit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@InitTweak/$(DEPDIR)/driver_cfa_cpp-RemoveInit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@Parser/$(DEPDIR)/driver_cfa_cpp-DeclarationNode.Po@am__quote@
@@ -1405,4 +1410,18 @@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o InitTweak/driver_cfa_cpp-RemoveInit.obj `if test -f 'InitTweak/RemoveInit.cc'; then $(CYGPATH_W) 'InitTweak/RemoveInit.cc'; else $(CYGPATH_W) '$(srcdir)/InitTweak/RemoveInit.cc'; fi`
 
+InitTweak/driver_cfa_cpp-FixInit.o: InitTweak/FixInit.cc
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT InitTweak/driver_cfa_cpp-FixInit.o -MD -MP -MF InitTweak/$(DEPDIR)/driver_cfa_cpp-FixInit.Tpo -c -o InitTweak/driver_cfa_cpp-FixInit.o `test -f 'InitTweak/FixInit.cc' || echo '$(srcdir)/'`InitTweak/FixInit.cc
+@am__fastdepCXX_TRUE@	$(am__mv) InitTweak/$(DEPDIR)/driver_cfa_cpp-FixInit.Tpo InitTweak/$(DEPDIR)/driver_cfa_cpp-FixInit.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='InitTweak/FixInit.cc' object='InitTweak/driver_cfa_cpp-FixInit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o InitTweak/driver_cfa_cpp-FixInit.o `test -f 'InitTweak/FixInit.cc' || echo '$(srcdir)/'`InitTweak/FixInit.cc
+
+InitTweak/driver_cfa_cpp-FixInit.obj: InitTweak/FixInit.cc
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT InitTweak/driver_cfa_cpp-FixInit.obj -MD -MP -MF InitTweak/$(DEPDIR)/driver_cfa_cpp-FixInit.Tpo -c -o InitTweak/driver_cfa_cpp-FixInit.obj `if test -f 'InitTweak/FixInit.cc'; then $(CYGPATH_W) 'InitTweak/FixInit.cc'; else $(CYGPATH_W) '$(srcdir)/InitTweak/FixInit.cc'; fi`
+@am__fastdepCXX_TRUE@	$(am__mv) InitTweak/$(DEPDIR)/driver_cfa_cpp-FixInit.Tpo InitTweak/$(DEPDIR)/driver_cfa_cpp-FixInit.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='InitTweak/FixInit.cc' object='InitTweak/driver_cfa_cpp-FixInit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o InitTweak/driver_cfa_cpp-FixInit.obj `if test -f 'InitTweak/FixInit.cc'; then $(CYGPATH_W) 'InitTweak/FixInit.cc'; else $(CYGPATH_W) '$(srcdir)/InitTweak/FixInit.cc'; fi`
+
 Parser/driver_cfa_cpp-parser.o: Parser/parser.cc
 @am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Parser/driver_cfa_cpp-parser.o -MD -MP -MF Parser/$(DEPDIR)/driver_cfa_cpp-parser.Tpo -c -o Parser/driver_cfa_cpp-parser.o `test -f 'Parser/parser.cc' || echo '$(srcdir)/'`Parser/parser.cc
Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/Parser/DeclarationNode.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// DeclarationNode.cc -- 
+// DeclarationNode.cc --
 //
 // Author           : Rodolfo G. Esteves
 // Created On       : Sat May 16 12:34:05 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jul 14 14:46:32 2015
-// Update Count     : 126
+// Last Modified By : Rob Schluntz
+// Last Modified On : Thu Jan 07 13:18:02 2016
+// Update Count     : 130
 //
 
@@ -96,4 +96,6 @@
 		os << endl << string( indent + 2, ' ' ) << "with initializer ";
 		initializer->printOneLine( os );
+		os << " maybe constructed? " << initializer->get_maybeConstructed();
+
 	} // if
 
@@ -357,5 +359,5 @@
 	} // if
 }
-	  
+
 DeclarationNode *DeclarationNode::addQualifiers( DeclarationNode *q ) {
 	if ( q ) {
@@ -508,5 +510,5 @@
 		assert( false );
 	} // switch
-	
+
 	return this;
 }
@@ -619,5 +621,5 @@
 		assert( a->type->kind == TypeData::Array );
 		TypeData *lastArray = findLast( a->type );
-		if ( type ) {  
+		if ( type ) {
 			switch ( type->kind ) {
 			  case TypeData::Aggregate:
@@ -663,5 +665,5 @@
 	} // if
 }
-	
+
 DeclarationNode *DeclarationNode::addIdList( DeclarationNode *ids ) {
 	type = addIdListToType( type, ids );
@@ -868,5 +870,5 @@
 Type *DeclarationNode::buildType() const {
 	assert( type );
-  
+
 	switch ( type->kind ) {
 	  case TypeData::Enum:
Index: src/Parser/InitializerNode.cc
===================================================================
--- src/Parser/InitializerNode.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/Parser/InitializerNode.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,12 +5,12 @@
 // file "LICENCE" distributed with Cforall.
 //
-// InitializerNode.cc -- 
-// 
+// InitializerNode.cc --
+//
 // Author           : Rodolfo G. Esteves
 // Created On       : Sat May 16 13:20:24 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Oct  8 17:18:55 2015
-// Update Count     : 4
-// 
+// Last Modified By : Rob Schluntz
+// Last Modified On : Thu Jan 07 13:32:57 2016
+// Update Count     : 13
+//
 
 #include <cassert>
@@ -23,5 +23,5 @@
 
 InitializerNode::InitializerNode( ExpressionNode *_expr, bool aggrp, ExpressionNode *des )
-	: expr( _expr ), aggregate( aggrp ), designator( des ), kids( 0 ) {
+	: expr( _expr ), aggregate( aggrp ), designator( des ), kids( 0 ), maybeConstructed( true ) {
 	if ( aggrp )
 		kids = dynamic_cast< InitializerNode *>( get_link() );
@@ -32,5 +32,5 @@
 
 InitializerNode::InitializerNode( InitializerNode *init, bool aggrp, ExpressionNode *des )
-	: expr( 0 ), aggregate( aggrp ), designator( des ), kids( 0 ) {
+	: expr( 0 ), aggregate( aggrp ), designator( des ), kids( 0 ), maybeConstructed( true ) {
 	if ( init != 0 )
 		set_link(init);
@@ -91,5 +91,5 @@
 		} // if
 
-		return new ListInit( initlist, designlist );
+		return new ListInit( initlist, designlist, maybeConstructed );
 	} else {
 		std::list< Expression *> designators;
@@ -99,5 +99,5 @@
 
 		if ( get_expression() != 0)
-			return new SingleInit( get_expression()->build(), designators );
+			return new SingleInit( get_expression()->build(), designators, maybeConstructed );
 	} // if
 
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/Parser/ParseNode.h	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// ParseNode.h -- 
+// ParseNode.h --
 //
 // Author           : Rodolfo G. Esteves
 // Created On       : Sat May 16 13:28:16 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Feb  1 13:32:32 2016
-// Update Count     : 184
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Feb 09 13:23:34 2016
+// Update Count     : 185
 //
 
@@ -177,12 +177,13 @@
 	enum Type { TupleC, Comma, TupleFieldSel, // n-adic
 				// triadic
-				Cond, NCond, 
+				Cond, NCond,
 				// diadic
-				SizeOf, AlignOf, OffsetOf, Attr, CompLit, Plus, Minus, Mul, Div, Mod, Or, And, 
-				BitOr, BitAnd, Xor, Cast, LShift, RShift, LThan, GThan, LEThan, GEThan, Eq, Neq, 
+				SizeOf, AlignOf, OffsetOf, Attr, CompLit, Plus, Minus, Mul, Div, Mod, Or, And,
+				BitOr, BitAnd, Xor, Cast, LShift, RShift, LThan, GThan, LEThan, GEThan, Eq, Neq,
 				Assign, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn, ERAssn, OrAssn,
 				Index, FieldSel, PFieldSel, Range,
 				// monadic
 				UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress,
+				Ctor, Dtor,
 	};
 
@@ -309,5 +310,5 @@
 	ValofExprNode( const ValofExprNode &other );
 	~ValofExprNode();
-  
+
 	virtual ValofExprNode *clone() const { return new ValofExprNode( *this ); }
 
@@ -332,5 +333,5 @@
 	enum TypeClass { Type, Dtype, Ftype };
 
-	static const char *storageName[];  
+	static const char *storageName[];
 	static const char *qualifierName[];
 	static const char *basicTypeName[];
@@ -422,5 +423,5 @@
 class StatementNode : public ParseNode {
   public:
-	enum Type { Exp,   If,        Switch,  Case,    Default,  Choose,   Fallthru, 
+	enum Type { Exp,   If,        Switch,  Case,    Default,  Choose,   Fallthru,
 				While, Do,        For,
 				Goto,  Continue,  Break,   Return,  Throw,
@@ -520,4 +521,7 @@
 	ExpressionNode *get_designators() const { return designator; }
 
+	InitializerNode *set_maybeConstructed( bool value ) { maybeConstructed = value; return this; }
+	bool get_maybeConstructed() const { return maybeConstructed; }
+
 	InitializerNode *next_init() const { return kids; }
 
@@ -531,4 +535,5 @@
 	ExpressionNode *designator; // may be list
 	InitializerNode *kids;
+	bool maybeConstructed;
 };
 
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/Parser/TypeData.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// TypeData.cc -- 
+// TypeData.cc --
 //
 // Author           : Rodolfo G. Esteves
 // Created On       : Sat May 16 15:12:51 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jul 14 14:57:23 2015
-// Update Count     : 32
+// Last Modified By : Rob Schluntz
+// Last Modified On : Thu Jan 14 10:43:42 2016
+// Update Count     : 36
 //
 
@@ -436,4 +436,6 @@
 	for ( std::list< TypeDecl* >::iterator i = outputList.begin(); i != outputList.end(); ++i ) {
 		if ( (*i)->get_kind() == TypeDecl::Any ) {
+			// add assertion parameters to `type' tyvars
+			// add:  T * ?=?(T *, T)
 			FunctionType *assignType = new FunctionType( Type::Qualifiers(), false );
 			assignType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
@@ -441,4 +443,14 @@
 			assignType->get_returnVals().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ), 0 ) );
 			(*i)->get_assertions().push_front( new FunctionDecl( "?=?", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, assignType, 0, false, false ) );
+
+			// add:  void ?{}(T *)
+			FunctionType *ctorType = new FunctionType( Type::Qualifiers(), false );
+			ctorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
+			(*i)->get_assertions().push_front( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, ctorType, 0, false, false ) );
+
+			// add:  void ^?{}(T *)
+			FunctionType *dtorType = new FunctionType( Type::Qualifiers(), false );
+			dtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
+			(*i)->get_assertions().push_front( new FunctionDecl( "^?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, dtorType, 0, false, false ) );
 		} // if
 	} // for
Index: src/Parser/parser.cc
===================================================================
--- src/Parser/parser.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/Parser/parser.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -2,17 +2,17 @@
 
 /* Bison implementation for Yacc-like parsers in C
-   
+
       Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
-   
+
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
@@ -27,5 +27,5 @@
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-   
+
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
@@ -7353,6 +7353,6 @@
 
 /* Line 1806 of yacc.c  */
-#line 1690 "parser.yy"
-    { (yyval.in) = (yyvsp[(2) - (2)].in); }
+#line 1684 "parser.yy"
+    { (yyval.in) = (yyvsp[(2) - (2)].in)->set_maybeConstructed( false ); }
     break;
 
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/Parser/parser.yy	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,6 +5,6 @@
 // file "LICENCE" distributed with Cforall.
 //
-// cfa.y -- 
-// 
+// cfa.y --
+//
 // Author           : Peter A. Buhr
 // Created On       : Sat Sep  1 20:22:55 2001
@@ -12,5 +12,5 @@
 // Last Modified On : Mon Feb  1 18:22:42 2016
 // Update Count     : 1483
-// 
+//
 
 // This grammar is based on the ANSI99/11 C grammar, specifically parts of EXPRESSION and STATEMENTS, and on the C
@@ -1688,5 +1688,5 @@
 		{ $$ = $2; }
 	| ATassign initializer
-		{ $$ = $2; }
+		{ $$ = $2->set_maybeConstructed( false ); }
 	;
 
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/ResolvExpr/Resolver.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Resolver.cc -- 
+// Resolver.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Sun May 17 12:17:01 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 24 17:33:54 2015
-// Update Count     : 178
+// Last Modified By : Rob Schluntz
+// Last Modified On : Thu Jan 14 16:45:32 2016
+// Update Count     : 203
 //
 
@@ -33,5 +33,5 @@
 	  public:
 		Resolver() : SymTab::Indexer( false ), switchType( 0 ) {}
-  
+
 		virtual void visit( FunctionDecl *functionDecl );
 		virtual void visit( ObjectDecl *functionDecl );
@@ -54,4 +54,5 @@
 		virtual void visit( SingleInit *singleInit );
 		virtual void visit( ListInit *listInit );
+		virtual void visit( ConstructorInit *ctorInit );
 	  private:
   	typedef std::list< Initializer * >::iterator InitIterator;
@@ -59,4 +60,5 @@
 	  void resolveAggrInit( AggregateDecl *, InitIterator &, InitIterator & );
 	  void resolveSingleAggrInit( Declaration *, InitIterator &, InitIterator & );
+	  void fallbackInit( ConstructorInit * ctorInit );
 
 		std::list< Type * > functionReturn;
@@ -95,5 +97,5 @@
 			return newExpr;
 		}
-  
+
 		Expression *findSingleExpression( Expression *untyped, const SymTab::Indexer &indexer ) {
 			TypeEnvironment env;
@@ -126,5 +128,5 @@
 			} // if
 		}
-  
+
 		Expression *findIntegralExpression( Expression *untyped, const SymTab::Indexer &indexer ) {
 			TypeEnvironment env;
@@ -159,7 +161,7 @@
 			return newExpr;
 		}
-  
-	}
-  
+
+	}
+
 	void Resolver::visit( ObjectDecl *objectDecl ) {
 		Type *new_type = resolveTypeof( objectDecl->get_type(), *this );
@@ -251,5 +253,5 @@
 			forStmt->set_condition( newExpr );
 		} // if
-		
+
 		if ( forStmt->get_increment() ) {
 			Expression * newExpr = findVoidExpression( forStmt->get_increment(), *this );
@@ -265,5 +267,5 @@
 		delete switchStmt->get_condition();
 		switchStmt->set_condition( newExpr );
-  
+
 		visitor.Visitor::visit( switchStmt );
 	}
@@ -307,5 +309,5 @@
 	bool isCharType( T t ) {
 		if ( BasicType * bt = dynamic_cast< BasicType * >( t ) ) {
-			return bt->get_kind() == BasicType::Char || bt->get_kind() == BasicType::SignedChar || 
+			return bt->get_kind() == BasicType::Char || bt->get_kind() == BasicType::SignedChar ||
 				bt->get_kind() == BasicType::UnsignedChar;
 		}
@@ -319,5 +321,5 @@
 				string n = ne->get_name();
 				if (n == "0") {
-					initContext = new BasicType(Type::Qualifiers(), 
+					initContext = new BasicType(Type::Qualifiers(),
 												BasicType::SignedInt);
 				} else {
@@ -325,5 +327,5 @@
 					initContext = decl->get_type();
 				}
-			} else if (ConstantExpr * e = 
+			} else if (ConstantExpr * e =
 					   dynamic_cast<ConstantExpr*>(singleInit->get_value())) {
 				Constant *c = e->get_constant();
@@ -349,5 +351,5 @@
 							singleInit->set_value( ce->get_arg() );
 							ce->set_arg( NULL );
-							delete ce;									
+							delete ce;
 						}
 					}
@@ -465,4 +467,44 @@
 #endif
 	}
+
+	// ConstructorInit - fall back on C-style initializer
+	void Resolver::fallbackInit( ConstructorInit * ctorInit ) {
+		// could not find valid constructor, or found an intrinsic constructor
+		// fall back on C-style initializer
+		delete ctorInit->get_ctor();
+		ctorInit->set_ctor( NULL );
+		maybeAccept( ctorInit->get_init(), *this );
+	}
+
+	void Resolver::visit( ConstructorInit *ctorInit ) {
+		TypeEnvironment env;
+		AlternativeFinder finder( *this, env );
+		finder.find( ctorInit->get_ctor() );
+
+		if ( finder.get_alternatives().size() == 0 ) {
+			fallbackInit( ctorInit );
+		} else if ( finder.get_alternatives().size() == 1 ) {
+			Alternative &choice = finder.get_alternatives().front();
+			if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( choice.expr ) ) {
+				if ( VariableExpr * function = dynamic_cast< VariableExpr * > ( appExpr->get_function() ) ) {
+					if ( function->get_var()->get_linkage() == LinkageSpec::Intrinsic ) {
+						// if the constructor that was found is intrinsic, reset to C-style
+						// initializer so that code generation is easy to handle
+						fallbackInit( ctorInit );
+						return;
+					}
+				}
+			}
+			// found a constructor - can get rid of C-style initializer
+			Expression *newExpr = choice.expr->clone();
+			finishExpr( newExpr, choice.env );
+			ctorInit->set_ctor( newExpr );
+			delete ctorInit->get_init();
+			ctorInit->set_init( NULL );
+		} else {
+			// too many constructors found
+			assert(false);
+		}
+	}
 } // namespace ResolvExpr
 
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/SymTab/Validate.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Sun May 17 21:50:04 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jan 27 22:03:12 2016
-// Update Count     : 225
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Feb 09 13:21:56 2016
+// Update Count     : 270
 //
 
@@ -202,4 +202,17 @@
 	};
 
+	class VerifyCtorDtor : public Visitor {
+	public:
+		/// ensure that constructors and destructors have at least one
+		/// parameter, the first of which must be a pointer, and no
+		/// return values.
+		static void verify( std::list< Declaration * > &translationUnit );
+
+		// VerifyCtorDtor() {}
+
+		virtual void visit( FunctionDecl *funcDecl );
+	private:
+	};
+
 	void validate( std::list< Declaration * > &translationUnit, bool doDebug ) {
 		Pass1 pass1;
@@ -213,4 +226,5 @@
 		AutogenerateRoutines::autogenerateRoutines( translationUnit );
 		acceptAll( translationUnit, pass3 );
+		VerifyCtorDtor::verify( translationUnit );
 	}
 
@@ -745,5 +759,5 @@
 		makeUnionFieldsAssignment( srcParam, dstParam, cloneWithParams( refType, unionParams ), back_inserter( assignDecl->get_statements()->get_kids() ) );
 		if ( isGeneric ) makeUnionFieldsAssignment( srcParam, returnVal, cloneWithParams( refType, unionParams ), back_inserter( assignDecl->get_statements()->get_kids() ) );
-		
+
 		if ( ! isGeneric ) assignDecl->get_statements()->get_kids().push_back( new ReturnStmt( noLabels, new VariableExpr( srcParam ) ) );
 
@@ -1042,4 +1056,36 @@
 	}
 
+	void VerifyCtorDtor::verify( std::list< Declaration * > & translationUnit ) {
+		VerifyCtorDtor verifier;
+		acceptAll( translationUnit, verifier );
+	}
+
+	void VerifyCtorDtor::visit( FunctionDecl * funcDecl ) {
+		FunctionType * funcType = funcDecl->get_functionType();
+		std::list< DeclarationWithType * > &returnVals = funcType->get_returnVals();
+		std::list< DeclarationWithType * > &params = funcType->get_parameters();
+
+		if ( funcDecl->get_name() == "?{}" || funcDecl->get_name() == "^?{}" ) {
+			if ( params.size() == 0 ) {
+				throw SemanticError( "Constructors and destructors require at least one parameter ", funcDecl );
+			}
+			if ( ! dynamic_cast< PointerType * >( params.front()->get_type() ) ) {
+				throw SemanticError( "First parameter of a constructor or destructor must be a pointer ", funcDecl );
+			}
+			if ( returnVals.size() != 0 ) {
+				throw SemanticError( "Constructors and destructors cannot have explicit return values ", funcDecl );
+			}
+		}
+
+		Visitor::visit( funcDecl );
+		// original idea: modify signature of ctor/dtors and insert appropriate return statements
+		// to cause desired behaviour
+		// new idea: add comma exprs to every ctor call to produce first parameter.
+		// this requires some memoization of the first parameter, because it can be a
+		// complicated expression with side effects (see: malloc). idea: add temporary variable
+		// that is assigned address of constructed object in ctor argument position and
+		// return the temporary. It should also be done after all implicit ctors are
+		// added, so not in this pass!
+	}
 } // namespace SymTab
 
Index: src/SynTree/Declaration.h
===================================================================
--- src/SynTree/Declaration.h	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/SynTree/Declaration.h	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Declaration.h -- 
+// Declaration.h --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Rob Schluntz
-// Last Modified On : Wed Dec 09 14:08:22 2015
-// Update Count     : 32
+// Last Modified On : Wed Jan 13 16:11:49 2016
+// Update Count     : 36
 //
 
Index: src/SynTree/Initializer.cc
===================================================================
--- src/SynTree/Initializer.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/SynTree/Initializer.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Initializer.cc -- 
+// Initializer.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Rob Schluntz
-// Last Modified On : Wed Aug 12 14:05:25 2015
-// Update Count     : 14
+// Last Modified On : Wed Jan 13 15:31:45 2016
+// Update Count     : 28
 //
 
@@ -18,5 +18,5 @@
 #include "Common/utility.h"
 
-Initializer::Initializer() {}
+Initializer::Initializer( bool maybeConstructed ) : maybeConstructed( maybeConstructed ) {}
 
 Initializer::~Initializer() {}
@@ -31,8 +31,8 @@
 void Initializer::print( std::ostream &os, int indent ) {}
 
-SingleInit::SingleInit( Expression *v, std::list< Expression *> &_designators ) : value ( v ), designators( _designators ) { 
+SingleInit::SingleInit( Expression *v, std::list< Expression *> &_designators, bool maybeConstructed ) : Initializer( maybeConstructed ), value ( v ), designators( _designators ) {
 }
 
-SingleInit::SingleInit( const SingleInit &other ) : value ( other.value ) {
+SingleInit::SingleInit( const SingleInit &other ) : Initializer(other), value ( other.value ) {
 	cloneAll(other.designators, designators );
 }
@@ -54,6 +54,6 @@
 }
 
-ListInit::ListInit( std::list<Initializer*> &_initializers, std::list<Expression *> &_designators )
-	: initializers( _initializers ), designators( _designators ) {
+ListInit::ListInit( std::list<Initializer*> &_initializers, std::list<Expression *> &_designators, bool maybeConstructed )
+	: Initializer( maybeConstructed), initializers( _initializers ), designators( _designators ) {
 }
 
@@ -65,18 +65,44 @@
 
 void ListInit::print( std::ostream &os, int indent ) {
-	os << std::endl << std::string(indent, ' ') << "Compound initializer:  "; 
+	os << std::endl << std::string(indent, ' ') << "Compound initializer:  ";
 	if ( ! designators.empty() ) {
 		os << std::string(indent + 2, ' ' ) << "designated by: [";
 		for ( std::list < Expression * >::iterator i = designators.begin();
 			  i != designators.end(); i++ ) {
-			( *i )->print(os, indent + 4 ); 
+			( *i )->print(os, indent + 4 );
 		} // for
-	
+
 		os << std::string(indent + 2, ' ' ) << "]";
 	} // if
 
-	for ( std::list<Initializer *>::iterator i = initializers.begin(); i != initializers.end(); i++ ) 
+	for ( std::list<Initializer *>::iterator i = initializers.begin(); i != initializers.end(); i++ )
 		(*i)->print( os, indent + 2 );
 }
+
+
+ConstructorInit::ConstructorInit( Expression * ctor, Initializer * init ) : Initializer( true ), ctor( ctor ), init( init ) {}
+ConstructorInit::~ConstructorInit() {
+	delete ctor;
+	delete init;
+}
+
+ConstructorInit *ConstructorInit::clone() const {
+	return new ConstructorInit( *this );
+}
+
+void ConstructorInit::print( std::ostream &os, int indent ) {
+	os << std::endl << std::string(indent, ' ') << "Constructor initializer: ";
+	if ( ctor ) {
+		os << " initially constructed with ";
+		ctor->print( os, indent+2 );
+	} // if
+
+	if ( init ) {
+		os << " with fallback C-style initializer: ";
+		init->print( os, indent+2 );
+	}
+}
+
+
 // Local Variables: //
 // tab-width: 4 //
Index: src/SynTree/Initializer.h
===================================================================
--- src/SynTree/Initializer.h	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/SynTree/Initializer.h	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Initializer.h -- 
+// Initializer.h --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon May 18 09:03:48 2015
-// Update Count     : 1
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Feb 09 14:40:15 2016
+// Update Count     : 19
 //
 
@@ -27,5 +27,5 @@
   public:
 	//	Initializer( std::string _name = std::string(""), int _pos = 0 );
-	Initializer( );
+	Initializer( bool maybeConstructed );
 	virtual ~Initializer();
 
@@ -43,4 +43,6 @@
 	}
 
+	bool get_maybeConstructed() { return maybeConstructed; }
+
 	virtual Initializer *clone() const = 0;
 	virtual void accept( Visitor &v ) = 0;
@@ -50,4 +52,5 @@
 	//	std::string name;
 	//	int pos;
+	bool maybeConstructed;
 };
 
@@ -55,8 +58,8 @@
 class SingleInit : public Initializer {
   public:
-	SingleInit( Expression *value, std::list< Expression *> &designators = *(new std::list<Expression *>()) );
+	SingleInit( Expression *value, std::list< Expression *> &designators, bool maybeConstructed = false );
 	SingleInit( const SingleInit &other );
 	virtual ~SingleInit();
-	
+
 	Expression *get_value() { return value; }
 	void set_value( Expression *newValue ) { value = newValue; }
@@ -79,6 +82,6 @@
 class ListInit : public Initializer {
   public:
-	ListInit( std::list<Initializer*> &, 
-			  std::list<Expression *> &designators = *(new std::list<Expression *>()) );
+	ListInit( std::list<Initializer*> &,
+			  std::list<Expression *> &designators, bool maybeConstructed = false );
 	virtual ~ListInit();
 
@@ -100,4 +103,28 @@
 };
 
+// ConstructorInit represents an initializer that is either a constructor expression or
+// a C-style initializer.
+class ConstructorInit : public Initializer {
+  public:
+	ConstructorInit( Expression * ctor, Initializer * init );
+	virtual ~ConstructorInit();
+
+	void set_ctor( Expression * newValue ) { ctor = newValue; }
+	Expression * get_ctor() const { return ctor; }
+	void set_init( Initializer * newValue ) { init = newValue; }
+	Initializer * get_init() const { return init; }
+
+	virtual ConstructorInit *clone() const;
+	virtual void accept( Visitor &v ) { v.visit( this ); }
+	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 );
+
+  private:
+	Expression * ctor;
+	// C-style initializer made up of SingleInit and ListInit nodes to use as a fallback
+	// if an appropriate constructor definition is not found by the resolver
+	Initializer * init;
+};
+
 #endif // INITIALIZER_H
 
Index: src/SynTree/Mutator.cc
===================================================================
--- src/SynTree/Mutator.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/SynTree/Mutator.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Mutator.cc -- 
+// Mutator.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 25 19:21:33 2015
-// Update Count     : 11
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Jan 13 15:32:29 2016
+// Update Count     : 15
 //
 
@@ -432,4 +432,10 @@
 }
 
+Initializer *Mutator::mutate( ConstructorInit *ctorInit ) {
+	ctorInit->set_ctor( maybeMutate( ctorInit->get_ctor(), *this ) );
+	ctorInit->set_init( maybeMutate( ctorInit->get_init(), *this ) );
+	return ctorInit;
+}
+
 Subrange *Mutator::mutate( Subrange *subrange ) {
 	return subrange;
Index: src/SynTree/Mutator.h
===================================================================
--- src/SynTree/Mutator.h	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/SynTree/Mutator.h	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Mutator.h -- 
+// Mutator.h --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Nov 19 22:26:16 2015
-// Update Count     : 8
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Jan 13 15:24:26 2016
+// Update Count     : 9
 //
 #include <cassert>
@@ -62,5 +62,5 @@
 	virtual Expression* mutate( MemberExpr *memberExpr );
 	virtual Expression* mutate( VariableExpr *variableExpr );
-	virtual Expression* mutate( ConstantExpr *constantExpr ); 
+	virtual Expression* mutate( ConstantExpr *constantExpr );
 	virtual Expression* mutate( SizeofExpr *sizeofExpr );
 	virtual Expression* mutate( AlignofExpr *alignofExpr );
@@ -93,4 +93,5 @@
 	virtual Initializer* mutate( SingleInit *singleInit );
 	virtual Initializer* mutate( ListInit *listInit );
+	virtual Initializer* mutate( ConstructorInit *ctorInit );
 
 	virtual Subrange *mutate( Subrange *subrange );
Index: src/SynTree/ObjectDecl.cc
===================================================================
--- src/SynTree/ObjectDecl.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/SynTree/ObjectDecl.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// ObjectDecl.cc -- 
+// ObjectDecl.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Rob Schluntz
-// Last Modified On : Tue Sep 29 14:13:01 2015
-// Update Count     : 18
+// Last Modified On : Tue Feb 09 13:21:03 2016
+// Update Count     : 30
 //
 
@@ -19,4 +19,5 @@
 #include "Expression.h"
 #include "Common/utility.h"
+#include "Statement.h"
 
 ObjectDecl::ObjectDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, Expression *bitfieldWidth, Type *type, Initializer *init, bool isInline, bool isNoreturn )
@@ -58,4 +59,5 @@
 		os << " with initializer ";
 		init->print( os, indent );
+		os << std::string(indent, ' ') << "maybeConstructed? " << init->get_maybeConstructed();
 	} // if
 
@@ -69,6 +71,6 @@
 #if 0
 	if ( get_mangleName() != "") {
-		os << get_mangleName() << ": "; 
-	} else 
+		os << get_mangleName() << ": ";
+	} else
 #endif
 	if ( get_name() != "" ) {
Index: src/SynTree/SynTree.h
===================================================================
--- src/SynTree/SynTree.h	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/SynTree/SynTree.h	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// SynTree.h -- 
+// SynTree.h --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 23 23:25:04 2015
-// Update Count     : 3
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Jan 13 15:28:41 2016
+// Update Count     : 4
 //
 
@@ -101,4 +101,5 @@
 class SingleInit;
 class ListInit;
+class ConstructorInit;
 
 class Subrange;
Index: src/SynTree/Visitor.cc
===================================================================
--- src/SynTree/Visitor.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/SynTree/Visitor.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Visitor.cc -- 
+// Visitor.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 24 16:11:05 2015
-// Update Count     : 15
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Jan 13 15:27:23 2016
+// Update Count     : 18
 //
 
@@ -364,4 +364,9 @@
 }
 
+void Visitor::visit( ConstructorInit *ctorInit ) {
+	maybeAccept( ctorInit->get_ctor(), *this );
+	maybeAccept( ctorInit->get_init(), *this );
+}
+
 void Visitor::visit( Subrange *subrange ) {}
 
Index: src/SynTree/Visitor.h
===================================================================
--- src/SynTree/Visitor.h	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/SynTree/Visitor.h	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Visitor.h -- 
+// Visitor.h --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan 25 21:20:44 2016
-// Update Count     : 5
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Feb 09 13:20:48 2016
+// Update Count     : 6
 //
 
@@ -62,5 +62,5 @@
 	virtual void visit( MemberExpr *memberExpr );
 	virtual void visit( VariableExpr *variableExpr );
-	virtual void visit( ConstantExpr *constantExpr ); 
+	virtual void visit( ConstantExpr *constantExpr );
 	virtual void visit( SizeofExpr *sizeofExpr );
 	virtual void visit( AlignofExpr *alignofExpr );
@@ -93,4 +93,5 @@
 	virtual void visit( SingleInit *singleInit );
 	virtual void visit( ListInit *listInit );
+	virtual void visit( ConstructorInit *ctorInit );
 
 	virtual void visit( Subrange *subrange );
Index: src/initialization.txt
===================================================================
--- src/initialization.txt	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/initialization.txt	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -34,2 +34,38 @@
 sure that resolved initializers for all declarations are being
 generated.
+
+
+------
+
+More recent email: (I am quoted; Richard is the responder)
+> As far as I'm aware, the only way that I could currently get the correct
+> results from the unification engine is by feeding it an expression that
+> looks like "?=?( ((struct Y)x.y).a, 10 )", then picking out the pieces that
+> I need (namely the correct choice for a). Does this seem like a reasonable
+> approach to solve this problem?
+
+No, unfortunately. Initialization isn't being rewritten as assignment,
+so you shouldn't allow the particular selection of assignment
+operators that happen to be in scope (and which may include
+user-defined operators) to guide the type resolution.
+
+I don't think there is any way to rewrite an initializer as a single
+expression and have the resolver just do the right thing. I see the
+algorithm as:
+
+For each alternative interpretation of the designator:
+  Construct an expression that casts the initializer to the type of
+    the designator
+  Construct an AlternativeFinder and use it to find the lowest cost
+    interpretation of the expression
+  Add this interpretation to a list of possibilities
+Go through the list of possibilities and pick the lowest cost
+
+As with many things in the resolver, it's conceptually simple but the
+implementation may be a bit of a pain. It fits in with functions like
+findSingleExpression, findIntegralExpression in Resolver.cc, although
+it will be significantly more complicated than any of the existing
+ones.
+
+
+
Index: src/libcfa/Makefile.am
===================================================================
--- src/libcfa/Makefile.am	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/libcfa/Makefile.am	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -6,5 +6,5 @@
 ## file "LICENCE" distributed with Cforall.
 ##
-## Makefile.am -- 
+## Makefile.am --
 ##
 ## Author           : Peter A. Buhr
@@ -51,5 +51,5 @@
 
 CFLAGS = -g -Wall -Wno-unused-function -B${abs_top_srcdir}/src/driver -XCFA -t  # TEMPORARY: does not build with -O2
-CC = ${abs_top_srcdir}/src/driver/cfa 
+CC = ${abs_top_srcdir}/src/driver/cfa
 
 # extension-less header files are overridden by default make rules => explicitly override rule
@@ -60,5 +60,5 @@
 	${CC} ${CFLAGS} -c -o $@ $<
 
-libs = stdlib iostream fstream iterator
+libs = # stdlib iostream fstream iterator  # temporarily getting rid of these until ctor/dtor autogen works
 libcfa_a_SOURCES = libcfa-prelude.c ${libs:=.c}
 
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/libcfa/Makefile.in	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -83,6 +83,5 @@
 libcfa_a_AR = $(AR) $(ARFLAGS)
 libcfa_a_LIBADD =
-am__objects_1 = stdlib.$(OBJEXT) iostream.$(OBJEXT) fstream.$(OBJEXT) \
-	iterator.$(OBJEXT)
+am__objects_1 =
 am_libcfa_a_OBJECTS = libcfa-prelude.$(OBJEXT) $(am__objects_1)
 libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS)
@@ -110,5 +109,5 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@
-CC = ${abs_top_srcdir}/src/driver/cfa 
+CC = ${abs_top_srcdir}/src/driver/cfa
 CCDEPMODE = @CCDEPMODE@
 CFA_BINDIR = @CFA_BINDIR@
@@ -213,5 +212,5 @@
 MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} \
 	${addprefix ${libdir}/,${lib_LIBRARIES}} ${includedir}/*
-libs = stdlib iostream fstream iterator
+libs = # stdlib iostream fstream iterator  # temporarily getting rid of these until ctor/dtor autogen works
 libcfa_a_SOURCES = libcfa-prelude.c ${libs:=.c}
 cheaders = bfd bfdlink demangle dialog evdns evhttp evrpc expat fcntl form gcrypt math
@@ -293,9 +292,5 @@
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstream.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iostream.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iterator.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa-prelude.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdlib.Po@am__quote@
 
 .c.obj:
Index: src/libcfa/prelude.cf
===================================================================
--- src/libcfa/prelude.cf	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/libcfa/prelude.cf	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -1,8 +1,8 @@
-//                               -*- Mode: C -*- 
-// 
+//                               -*- Mode: C -*-
+//
 // Copyright (C) Glen Ditchfield 1994, 1999
-// 
+//
 // prelude.cf -- Standard Cforall Preample for C99
-// 
+//
 // Author           : Glen Ditchfield
 // Created On       : Sat Nov 29 07:23:41 2014
@@ -116,11 +116,11 @@
 forall( ftype FT ) lvalue FT		 *?( FT * );
 
-_Bool			+?( _Bool ),			-?( _Bool ),			~?( _Bool );	     
-signed int		+?( signed int ),		-?( signed int ),		~?( signed int );	     
-unsigned int		+?( unsigned int ),		-?( unsigned int ),		~?( unsigned int );	     
-signed long int		+?( signed long int ),		-?( signed long int ),		~?( signed long int );	     
-unsigned long int	+?( unsigned long int ),	-?( unsigned long int ),	~?( unsigned long int );	     
-signed long long int	+?( signed long long int ),	-?( signed long long int ),	~?( signed long long int );    
-unsigned long long int	+?( unsigned long long int ),	-?( unsigned long long int ),	~?( unsigned long long int );  
+_Bool			+?( _Bool ),			-?( _Bool ),			~?( _Bool );
+signed int		+?( signed int ),		-?( signed int ),		~?( signed int );
+unsigned int		+?( unsigned int ),		-?( unsigned int ),		~?( unsigned int );
+signed long int		+?( signed long int ),		-?( signed long int ),		~?( signed long int );
+unsigned long int	+?( unsigned long int ),	-?( unsigned long int ),	~?( unsigned long int );
+signed long long int	+?( signed long long int ),	-?( signed long long int ),	~?( signed long long int );
+unsigned long long int	+?( unsigned long long int ),	-?( unsigned long long int ),	~?( unsigned long long int );
 float			+?( float ),			-?( float );
 double			+?( double ),			-?( double );
@@ -626,2 +626,216 @@
 			?+=?( long double _Complex *, long double _Complex ), ?+=?( volatile long double _Complex *, long double _Complex ),
 			?-=?( long double _Complex *, long double _Complex ), ?-=?( volatile long double _Complex *, long double _Complex );
+
+
+
+
+
+// ------------------------------------------------------------
+//
+// Section ??? Constructors and Destructors
+//
+// ------------------------------------------------------------
+
+// default ctor
+void	?{}( _Bool * ),				?{}( volatile _Bool * );
+void	?{}( unsigned char * ),			?{}( volatile unsigned char * );
+void	?{}( signed int * ),			?{}( volatile signed int * );
+void	?{}( unsigned int * ),			?{}( volatile unsigned int * );
+void	?{}( signed long int * ),		?{}( volatile signed long int * );
+void	?{}( unsigned long int * ),		?{}( volatile unsigned long int * );
+void	?{}( signed long long int * ),		?{}( volatile signed long long int * );
+void	?{}( unsigned long long int * ),	?{}( volatile unsigned long long int * );
+void	?{}( float * ),				?{}( volatile float * );
+void	?{}( double * ),			?{}( volatile double * );
+void	?{}( long double * ),			?{}( volatile long double * );
+void	?{}( float _Complex * ),		?{}( volatile float _Complex * );
+void	?{}( double _Complex * ),		?{}( volatile double _Complex * );
+void	?{}( long double _Complex * ),		?{}( volatile long double _Complex * );
+
+// copy ctor
+void	?{}( _Bool *, _Bool ),					?{}( volatile _Bool *, _Bool );
+void	?{}( unsigned char *, unsigned char ),			?{}( volatile unsigned char *, unsigned char );
+void	?{}( signed int *, signed int),				?{}( volatile signed int *, signed int );
+void	?{}( unsigned int *, unsigned int),			?{}( volatile unsigned int *, unsigned int );
+void	?{}( signed long int *, signed long int),		?{}( volatile signed long int *, signed long int );
+void	?{}( unsigned long int *, unsigned long int),		?{}( volatile unsigned long int *, unsigned long int );
+void	?{}( signed long long int *, signed long long int),	?{}( volatile signed long long int *, signed long long int );
+void	?{}( unsigned long long int *, unsigned long long int),	?{}( volatile unsigned long long int *, unsigned long long int );
+void	?{}( float *, float),					?{}( volatile float *, float );
+void	?{}( double *, double),					?{}( volatile double *, double );
+void	?{}( long double *, long double),			?{}( volatile long double *, long double );
+void	?{}( float _Complex *, float _Complex),			?{}( volatile float _Complex *, float _Complex );
+void	?{}( double _Complex *, double _Complex),		?{}( volatile double _Complex *, double _Complex );
+void	?{}( long double _Complex *, long double _Complex),	?{}( volatile long double _Complex *, long double _Complex );
+
+// dtor
+void	^?{}( _Bool * ),			^?{}( volatile _Bool * );
+void	^?{}( signed int * ),			^?{}( volatile signed int * );
+void	^?{}( unsigned int * ),			^?{}( volatile unsigned int * );
+void	^?{}( signed long int * ),		^?{}( volatile signed long int * );
+void	^?{}( unsigned long int * ),		^?{}( volatile unsigned long int * );
+void	^?{}( signed long long int * ),		^?{}( volatile signed long long int * );
+void	^?{}( unsigned long long int * ),	^?{}( volatile unsigned long long int * );
+void	^?{}( float * ),			^?{}( volatile float * );
+void	^?{}( double * ),			^?{}( volatile double * );
+void	^?{}( long double * ),			^?{}( volatile long double * );
+void	^?{}( float _Complex * ),		^?{}( volatile float _Complex * );
+void	^?{}( double _Complex * ),		^?{}( volatile double _Complex * );
+void	^?{}( long double _Complex * ),		^?{}( volatile long double _Complex * );
+
+// // default ctor
+// forall( dtype DT ) void	 ?{}(		     DT ** );
+// forall( dtype DT ) void	 ?{}( const	     DT ** );
+// forall( dtype DT ) void	 ?{}(	    volatile DT ** );
+// forall( dtype DT ) void	 ?{}( const volatile DT ** );
+
+// // copy ctor
+// forall( dtype DT ) void	 ?{}(		     DT **, DT* );
+// forall( dtype DT ) void	 ?{}( const	     DT **, DT* );
+// forall( dtype DT ) void	 ?{}(	    volatile DT **, DT* );
+// forall( dtype DT ) void	 ?{}( const volatile DT **, DT* );
+
+// // dtor
+// forall( dtype DT ) void	^?{}(		     DT ** );
+// forall( dtype DT ) void	^?{}( const	     DT ** );
+// forall( dtype DT ) void	^?{}(	    volatile DT ** );
+// forall( dtype DT ) void	^?{}( const volatile DT ** );
+
+// copied from assignment section
+// copy constructors
+forall( ftype FT ) void ?{}( FT **, FT * );
+forall( ftype FT ) void ?{}( FT * volatile *, FT * );
+
+forall( dtype DT ) void ?{}(		     DT *	   *,			DT * );
+forall( dtype DT ) void ?{}(		     DT * volatile *,			DT * );
+forall( dtype DT ) void ?{}( const	     DT *	   *,			DT * );
+forall( dtype DT ) void ?{}( const	     DT * volatile *,			DT * );
+forall( dtype DT ) void ?{}( const	     DT *	   *, const		DT * );
+forall( dtype DT ) void ?{}( const	     DT * volatile *, const		DT * );
+forall( dtype DT ) void ?{}(	   volatile  DT *	   *,			DT * );
+forall( dtype DT ) void ?{}(	   volatile  DT * volatile *,			DT * );
+forall( dtype DT ) void ?{}(	   volatile  DT *	   *,	    volatile	DT * );
+forall( dtype DT ) void ?{}(	   volatile  DT * volatile *,	    volatile	DT * );
+
+forall( dtype DT ) void ?{}( const volatile  DT *	   *,			DT * );
+forall( dtype DT ) void ?{}( const volatile  DT * volatile *,			DT * );
+forall( dtype DT ) void ?{}( const volatile  DT *	   *, const		DT * );
+forall( dtype DT ) void ?{}( const volatile  DT * volatile *, const		DT * );
+forall( dtype DT ) void ?{}( const volatile  DT *	   *,	    volatile	DT * );
+forall( dtype DT ) void ?{}( const volatile  DT * volatile *,	    volatile	DT * );
+forall( dtype DT ) void ?{}( const volatile  DT *	   *, const volatile	DT * );
+forall( dtype DT ) void ?{}( const volatile  DT * volatile *, const volatile	DT * );
+
+forall( dtype DT ) void ?{}(		     DT *	   *,			void * );
+forall( dtype DT ) void ?{}(		     DT * volatile *,			void * );
+forall( dtype DT ) void ?{}( const	     DT *	   *,			void * );
+forall( dtype DT ) void ?{}( const	     DT * volatile *,			void * );
+forall( dtype DT ) void ?{}( const	     DT *	   *, const		void * );
+forall( dtype DT ) void ?{}( const	     DT * volatile *, const		void * );
+forall( dtype DT ) void ?{}(	   volatile  DT *	   *,			void * );
+forall( dtype DT ) void ?{}(	   volatile  DT * volatile *,			void * );
+forall( dtype DT ) void ?{}(	   volatile  DT *	   *,	    volatile	void * );
+forall( dtype DT ) void ?{}(	   volatile  DT * volatile *,	    volatile	void * );
+
+forall( dtype DT ) void ?{}( const volatile  DT *	   *,			void * );
+forall( dtype DT ) void ?{}( const volatile  DT * volatile *,			void * );
+forall( dtype DT ) void ?{}( const volatile  DT *	   *, const		void * );
+forall( dtype DT ) void ?{}( const volatile  DT * volatile *, const		void * );
+forall( dtype DT ) void ?{}( const volatile  DT *	   *,	    volatile	void * );
+forall( dtype DT ) void ?{}( const volatile  DT * volatile *,	    volatile	void * );
+forall( dtype DT ) void ?{}( const volatile  DT *	   *, const volatile	void * );
+forall( dtype DT ) void ?{}( const volatile  DT * volatile *, const volatile	void * );
+
+forall( dtype DT ) void ?{}(		     void *	     *,			DT * );
+forall( dtype DT ) void ?{}(		     void * volatile *,			DT * );
+forall( dtype DT ) void ?{}( const	     void *	     *,			DT * );
+forall( dtype DT ) void ?{}( const	     void * volatile *,			DT * );
+forall( dtype DT ) void ?{}( const	     void *	     *, const		DT * );
+forall( dtype DT ) void ?{}( const	     void * volatile *, const		DT * );
+forall( dtype DT ) void ?{}(	    volatile void *	     *,			DT * );
+forall( dtype DT ) void ?{}(	    volatile void * volatile *,			DT * );
+forall( dtype DT ) void ?{}(	    volatile void *	     *,	      volatile	DT * );
+forall( dtype DT ) void ?{}(	    volatile void * volatile *,	      volatile	DT * );
+forall( dtype DT ) void ?{}( const volatile void *	     *,			DT * );
+forall( dtype DT ) void ?{}( const volatile void * volatile *,			DT * );
+forall( dtype DT ) void ?{}( const volatile void *	     *, const		DT * );
+forall( dtype DT ) void ?{}( const volatile void * volatile *, const		DT * );
+forall( dtype DT ) void ?{}( const volatile void *	     *,	      volatile	DT * );
+forall( dtype DT ) void ?{}( const volatile void * volatile *,	      volatile	DT * );
+forall( dtype DT ) void ?{}( const volatile void *	     *, const volatile	DT * );
+forall( dtype DT ) void ?{}( const volatile void * volatile *, const volatile	DT * );
+
+void 	?{}(		    void *	    *,		      void * );
+void 	?{}(		    void * volatile *,		      void * );
+void 	?{}( const	    void *	    *,		      void * );
+void 	?{}( const	    void * volatile *,		      void * );
+void 	?{}( const	    void *	    *, const	      void * );
+void 	?{}( const	    void * volatile *, const	      void * );
+void 	?{}(	   volatile void *	    *,		      void * );
+void 	?{}(	   volatile void * volatile *,		      void * );
+void 	?{}(	   volatile void *	    *,	     volatile void * );
+void 	?{}(	   volatile void * volatile *,	     volatile void * );
+void 	?{}( const volatile void *	    *,		      void * );
+void 	?{}( const volatile void * volatile *,		      void * );
+void 	?{}( const volatile void *	    *, const	      void * );
+void 	?{}( const volatile void * volatile *, const	      void * );
+void 	?{}( const volatile void *	    *,	     volatile void * );
+void 	?{}( const volatile void * volatile *,	     volatile void * );
+void 	?{}( const volatile void *	    *, const volatile void * );
+void 	?{}( const volatile void * volatile *, 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 ?{}( const	    DT * volatile *, 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( dtype DT ) void ?{}( const volatile DT * volatile *, forall( dtype DT2 ) const DT2 * );
+
+forall( ftype FT ) void	?{}( FT *	   *, forall( ftype FT2 ) FT2 * );
+forall( ftype FT ) void	?{}( FT * volatile *, forall( ftype FT2 ) FT2 * );
+
+// default ctors
+forall( ftype FT ) void	?{}( FT *	   * );
+forall( ftype FT ) void	?{}( FT * volatile * );
+
+forall( dtype DT ) void	?{}(		     DT *	   *);
+forall( dtype DT ) void	?{}(		     DT * volatile *);
+forall( dtype DT ) void	?{}( const	     DT *	   *);
+forall( dtype DT ) void	?{}( const	     DT * volatile *);
+forall( dtype DT ) void	?{}(	   volatile  DT *	   *);
+forall( dtype DT ) void	?{}(	   volatile  DT * volatile *);
+forall( dtype DT ) void ?{}( const volatile  DT *	   *);
+forall( dtype DT ) void ?{}( const volatile  DT * volatile *);
+
+void 	?{}(		    void *	    *);
+void 	?{}(		    void * volatile *);
+void 	?{}( const	    void *	    *);
+void 	?{}( const	    void * volatile *);
+void 	?{}(	   volatile void *	    *);
+void 	?{}(	   volatile void * volatile *);
+void 	?{}( const volatile void *	    *);
+void 	?{}( const volatile void * volatile *);
+
+// dtors
+forall( ftype FT ) void	^?{}( FT *	   * );
+forall( ftype FT ) void	^?{}( FT * volatile * );
+
+forall( dtype DT ) void	^?{}(		     DT *	   *);
+forall( dtype DT ) void	^?{}(		     DT * volatile *);
+forall( dtype DT ) void	^?{}( const	     DT *	   *);
+forall( dtype DT ) void	^?{}( const	     DT * volatile *);
+forall( dtype DT ) void	^?{}(	   volatile  DT *	   *);
+forall( dtype DT ) void	^?{}(	   volatile  DT * volatile *);
+forall( dtype DT ) void ^?{}( const volatile  DT *	   *);
+forall( dtype DT ) void ^?{}( const volatile  DT * volatile *);
+
+void 	^?{}(		    void *	    *);
+void 	^?{}(		    void * volatile *);
+void 	^?{}( const	    void *	    *);
+void 	^?{}( const	    void * volatile *);
+void 	^?{}(	   volatile void *	    *);
+void 	^?{}(	   volatile void * volatile *);
+void 	^?{}( const volatile void *	    *);
+void 	^?{}( const volatile void * volatile *);
Index: src/main.cc
===================================================================
--- src/main.cc	(revision bd8540001c298d12d68dabcd274a24ed5a4dfb7a)
+++ src/main.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// main.cc -- 
+// main.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Fri May 15 23:12:02 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jan 27 22:20:20 2016
-// Update Count     : 199
+// Last Modified By : Rob Schluntz
+// Last Modified On : Tue Feb 09 13:28:11 2016
+// Update Count     : 200
 //
 
@@ -41,4 +41,5 @@
 #include "InitTweak/Mutate.h"
 #include "InitTweak/RemoveInit.h"
+#include "InitTweak/FixInit.h"
 //#include "Explain/GenProlog.h"
 //#include "Try/Visit.h"
@@ -60,4 +61,5 @@
 	astp = false,
 	bresolvep = false,
+	ctorinitp = false,
 	exprp = false,
 	expraltp = false,
@@ -74,9 +76,10 @@
 	codegenp = false;
 
-enum { Ast, Bresolver, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, Validate, };
+enum { Ast, Bresolver, CtorInitFix, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, Validate, };
 
 static struct option long_opts[] = {
 	{ "ast", no_argument, 0, Ast },
 	{ "before-resolver", no_argument, 0, Bresolver },
+	{ "ctorinitfix", no_argument, 0, CtorInitFix },
 	{ "expr", no_argument, 0, Expr },
 	{ "expralt", no_argument, 0, ExprAlt },
@@ -100,7 +103,7 @@
 
 	opterr = 0;											// prevent getopt from printing error messages
-	
+
 	int c;
-	while ( (c = getopt_long( argc, argv, "abefglnpqrstvyzD:", long_opts, &long_index )) != -1 ) {
+	while ( (c = getopt_long( argc, argv, "abcefFglnpqrstvyzD:", long_opts, &long_index )) != -1 ) {
 		switch ( c ) {
 		  case Ast:
@@ -111,4 +114,8 @@
 		  case 'b':										// print before resolver steps
 			bresolvep = true;
+			break;
+			case CtorInitFix:
+			case 'c':
+			ctorinitp = true;
 			break;
 		  case Expr:
@@ -187,5 +194,5 @@
 			output = new ofstream( argv[ optind ] );
 		} // if
-	
+
 		Parser::get_parser().set_debug( grammarp );
 
@@ -208,11 +215,11 @@
 					exit( 1 );
 				} // if
-		    
+
 				parse( prelude, LinkageSpec::Intrinsic );
 			} // if
 		} // if
 
-		parse( input, libcfap ? LinkageSpec::Intrinsic : LinkageSpec::Cforall, grammarp );	
-  
+		parse( input, libcfap ? LinkageSpec::Intrinsic : LinkageSpec::Cforall, grammarp );
+
 		if ( parsep ) {
 			Parser::get_parser().get_parseTree()->printList( std::cout );
@@ -249,7 +256,7 @@
 		OPTPRINT( "mutate" )
 		ControlStruct::mutate( translationUnit );
-		OPTPRINT( "fixNames" ) 
+		OPTPRINT( "fixNames" )
 		CodeGen::fixNames( translationUnit );
-		OPTPRINT( "tweak" )
+		OPTPRINT( "tweakInit" )
 		InitTweak::tweak( translationUnit );
 
@@ -268,4 +275,13 @@
 		if ( exprp ) {
 			dump( translationUnit );
+			return 0;
+		}
+
+		OPTPRINT( "fixInit" )
+		// fix ObjectDecl - replaces ConstructorInit nodes
+		InitTweak::fix( translationUnit );
+		if ( ctorinitp ) {
+			dump ( translationUnit );
+			return 0;
 		}
 
@@ -278,5 +294,5 @@
 		OPTPRINT( "box" )
 		GenPoly::box( translationUnit );
-		
+
 		// print tree right before code generation
 		if ( codegenp ) {
@@ -334,5 +350,5 @@
 	std::list< Declaration * > decls;
 	if ( noprotop ) {
-		filter( translationUnit.begin(), translationUnit.end(), 
+		filter( translationUnit.begin(), translationUnit.end(),
 				std::back_inserter( decls ), notPrelude );
 	} else {
