Index: src/ArgTweak/FunctionFixer.cc
===================================================================
--- src/ArgTweak/FunctionFixer.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/ArgTweak/FunctionFixer.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// FunctionFixer.cc -- 
+// FunctionFixer.cc --
 //
 // Author           : Rodolfo G. Esteves
@@ -42,18 +42,15 @@
 	Expression *FunctionFixer::mutate( UntypedExpr *untypedExpr ) throw ( SemanticError ) {
 		assert( untypedExpr != 0 );
-		NameExpr *function;
 
-		if ( ( function = dynamic_cast< NameExpr *>(untypedExpr->get_function()) ) != 0 ) {
+		if ( NameExpr * function = dynamic_cast< NameExpr *>(untypedExpr->get_function() ) ) {
 			std::list < DeclarationWithType * > options;
 			index->lookupId ( function->get_name(), options );
 			for ( std::list < DeclarationWithType * >::iterator i = options.begin(); i != options.end(); i++ ) {
-				FunctionType *f;
-				if ( ( f = dynamic_cast< FunctionType * > ( (*i)->get_type() ) ) != 0 )	{
+				if ( FunctionType * f = dynamic_cast< FunctionType * > ( (*i)->get_type() ) )	{
 					std::list < DeclarationWithType * > &pars = f->get_parameters();
-
 					bool candidateExists ;
-					for ( std::list < DeclarationWithType * >::iterator p = pars.begin(); p != pars.end(); p++ )
+					for ( std::list < DeclarationWithType * >::iterator p = pars.begin(); p != pars.end(); p++ ) {
 						if ( ( candidateExists = align( f->get_parameters(), untypedExpr->get_args(), Matcher() ) ) ) break;
-
+					}
 					if ( ! candidateExists ) throw SemanticError("Error in function call");
 				} // if
Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/InitTweak/FixGlobalInit.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -125,7 +125,5 @@
 		std::list< Statement * > & destroyStatements = destroyFunction->get_statements()->get_kids();
 
-		// if ( objDecl->get_init() == NULL ) return;
 		if ( ! tryConstruct( objDecl ) ) return; // don't construct @= or designated objects
-		if ( objDecl->get_type()->get_isConst() ) return; // temporary: can't assign to a const variable
 		if ( objDecl->get_storageClass() == DeclarationNode::Extern ) return;
 		// C allows you to initialize objects with constant expressions
@@ -146,10 +144,10 @@
 			init->get_args().push_back( new AddressExpr( new VariableExpr( objDecl ) ) );
 			init->get_args().push_back( new VariableExpr( newObj ) );
-			initStatements.push_back( new ExprStmt( noLabels, init ) );
+			initStatements.push_back( new ImplicitCtorDtorStmt( new ExprStmt( noLabels, init ) ) );
 
 			// add destructor calls to global destroy function
 			UntypedExpr * destroy = new UntypedExpr( new NameExpr( "^?{}" ) );
 			destroy->get_args().push_back( new AddressExpr( new VariableExpr( objDecl ) ) );
-			destroyStatements.push_front( new ExprStmt( noLabels, destroy ) );
+			destroyStatements.push_front( new ImplicitCtorDtorStmt( new ExprStmt( noLabels, destroy ) ) );
 		}
 	}
Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/InitTweak/FixInit.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -132,5 +132,4 @@
 				return appExpr;
 			} else if ( DeclarationWithType * funcDecl = dynamic_cast< DeclarationWithType * > ( function->get_var() ) ) {
-				// FunctionType * ftype = funcDecl->get_functionType();
 				FunctionType * ftype = dynamic_cast< FunctionType * >( GenPoly::getFunctionType( funcDecl->get_type() ) );
 				assert( ftype );
Index: src/InitTweak/GenInit.cc
===================================================================
--- src/InitTweak/GenInit.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/InitTweak/GenInit.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -164,6 +164,5 @@
 						assert( ctor.size() == 1 );
 						assert( dtor.size() == 1 );
-
-						objDecl->set_init( new ConstructorInit( ctor.front(), dtor.front(), objDecl->get_init() ) );
+						objDecl->set_init( new ConstructorInit( new ImplicitCtorDtorStmt( ctor.front() ), new ImplicitCtorDtorStmt( dtor.front() ), objDecl->get_init() ) );
 					} else {
 						// array came with an initializer list: initialize each element
@@ -185,5 +184,5 @@
 					ExprStmt * ctorStmt = new ExprStmt( noLabels, ctor );
 					ExprStmt * dtorStmt = new ExprStmt( noLabels, dtor );
-					objDecl->set_init( new ConstructorInit( ctorStmt, dtorStmt, objDecl->get_init() ) );
+					objDecl->set_init( new ConstructorInit( new ImplicitCtorDtorStmt( ctorStmt ), new ImplicitCtorDtorStmt( dtorStmt ), objDecl->get_init() ) );
 				}
 			}
Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/InitTweak/InitTweak.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -60,16 +60,8 @@
   }
 
-  bool isInstrinsicSingleArgCallStmt( Statement * stmt ) {
-    if ( stmt == NULL ) return false;
+  Expression * getCtorDtorCall( Statement * stmt ) {
+    if ( stmt == NULL ) return NULL;
     if ( ExprStmt * exprStmt = dynamic_cast< ExprStmt * >( stmt ) ) {
-      ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( exprStmt->get_expr() );
-      assert( appExpr );
-      VariableExpr * function = dynamic_cast< VariableExpr * >( appExpr->get_function() );
-      assert( function );
-      // check for Intrinsic only - don't want to remove all overridable ctor/dtors because autogenerated ctor/dtor
-      // will call all member dtors, and some members may have a user defined dtor.
-      FunctionType * funcType = GenPoly::getFunctionType( function->get_var()->get_type() );
-      assert( funcType );
-      return function->get_var()->get_linkage() == LinkageSpec::Intrinsic && funcType->get_parameters().size() == 1;
+      return exprStmt->get_expr();
     } else if ( CompoundStmt * compoundStmt = dynamic_cast< CompoundStmt * >( stmt ) ) {
       // could also be a compound statement with a loop, in the case of an array
@@ -77,5 +69,7 @@
       ForStmt * forStmt = dynamic_cast< ForStmt * >( compoundStmt->get_kids().back() );
       assert( forStmt && forStmt->get_body() );
-      return isInstrinsicSingleArgCallStmt( forStmt->get_body() );
+      return getCtorDtorCall( forStmt->get_body() );
+    } if ( ImplicitCtorDtorStmt * impCtorDtorStmt = dynamic_cast< ImplicitCtorDtorStmt * > ( stmt ) ) {
+      return getCtorDtorCall( impCtorDtorStmt->get_callStmt() );
     } else {
       // should never get here
@@ -83,3 +77,63 @@
     }
   }
+
+  bool isInstrinsicSingleArgCallStmt( Statement * stmt ) {
+    Expression * callExpr = getCtorDtorCall( stmt );
+    if ( ! callExpr ) return false;
+    ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( callExpr );
+    assert( appExpr );
+    VariableExpr * function = dynamic_cast< VariableExpr * >( appExpr->get_function() );
+    assert( function );
+    // check for Intrinsic only - don't want to remove all overridable ctor/dtors because autogenerated ctor/dtor
+    // will call all member dtors, and some members may have a user defined dtor.
+    FunctionType * funcType = GenPoly::getFunctionType( function->get_var()->get_type() );
+    assert( funcType );
+    return function->get_var()->get_linkage() == LinkageSpec::Intrinsic && funcType->get_parameters().size() == 1;
+  }
+
+  namespace {
+    template<typename CallExpr>
+    Expression * callArg( CallExpr * callExpr, unsigned int pos ) {
+      if ( pos >= callExpr->get_args().size() ) assert( false && "asking for argument that doesn't exist. Return NULL/throw exception?" );
+      for ( Expression * arg : callExpr->get_args() ) {
+        if ( pos == 0 ) return arg;
+        pos--;
+      }
+      assert( false );
+    }
+  }
+
+  Expression * getCallArg( Expression * callExpr, unsigned int pos ) {
+    if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( callExpr ) ) {
+      return callArg( appExpr, pos );
+    } else if ( UntypedExpr * untypedExpr = dynamic_cast< UntypedExpr * >( callExpr ) ) {
+      return callArg( untypedExpr, pos );
+    } else {
+      assert( false && "Unexpected expression type passed to getCallArg" );
+    }
+  }
+
+  namespace {
+    template<typename CallExpr>
+    std::string funcName( CallExpr * expr ) {
+      Expression * func = expr->get_function();
+      if ( NameExpr * nameExpr = dynamic_cast< NameExpr * >( func ) ) {
+        return nameExpr->get_name();
+      } else if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( func ) ) {
+        return varExpr->get_var()->get_name();
+      } else {
+        assert( false && "Unexpected expression type being called as a function in call expression" );
+      }
+    }
+  }
+
+  std::string getFunctionName( Expression * expr ) {
+    if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( expr ) ) {
+      return funcName( appExpr );
+    } else if ( UntypedExpr * untypedExpr = dynamic_cast< UntypedExpr * > ( expr ) ) {
+      return funcName( untypedExpr );
+    } else {
+      assert( false && "Unexpected expression type passed to getFunctionName" );
+    }
+  }
 }
Index: src/InitTweak/InitTweak.h
===================================================================
--- src/InitTweak/InitTweak.h	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/InitTweak/InitTweak.h	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -39,4 +39,13 @@
   /// Currently has assertions that make it less than fully general.
   bool isInstrinsicSingleArgCallStmt( Statement * expr );
+
+  /// get the Ctor/Dtor call expression from a Statement that looks like a generated ctor/dtor call
+  Expression * getCtorDtorCall( Statement * stmt );
+
+  /// returns the name of the function being called
+  std::string getFunctionName( Expression * expr );
+
+  /// returns the argument to a call expression in position N indexed from 0
+  Expression * getCallArg( Expression * callExpr, unsigned int pos );
 } // namespace
 
Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -39,4 +39,5 @@
 #include "Tuples/NameMatcher.h"
 #include "Common/utility.h"
+#include "InitTweak/InitTweak.h"
 
 extern bool resolvep;
@@ -546,7 +547,6 @@
 
 		{
-			NameExpr *fname = 0;;
-			if ( ( fname = dynamic_cast<NameExpr *>( untypedExpr->get_function()))
-				 && ( fname->get_name() == std::string("&&")) ) {
+			std::string fname = InitTweak::getFunctionName( untypedExpr );
+			if ( fname == "&&" ) {
 				VoidType v = Type::Qualifiers();		// resolve to type void *
 				PointerType pt( Type::Qualifiers(), v.clone() );
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/ResolvExpr/Resolver.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -52,4 +52,5 @@
 		virtual void visit( BranchStmt *branchStmt );
 		virtual void visit( ReturnStmt *returnStmt );
+		virtual void visit( ImplicitCtorDtorStmt * impCtorDtorStmt );
 
 		virtual void visit( SingleInit *singleInit );
@@ -492,5 +493,5 @@
 		} catch ( SemanticError ) {
 			// no alternatives for the constructor initializer - fallback on C-style initializer
-			// xxx- not sure if this makes a ton of sense - should maybe never be able to have this situation?
+			// xxx - not sure if this makes a ton of sense - should maybe never be able to have this situation?
 			fallbackInit( ctorInit );
 			return;
@@ -513,4 +514,50 @@
 		}
 	}
+
+	void Resolver::visit( ImplicitCtorDtorStmt * impCtorDtorStmt ) {
+		// this code is fairly gross. If VariableExpr didn't have its own results list then this could be cleaned up a bit
+		// by remembering the ObjectDecl in the ImplicitCtorDtorStmt and changing the ObjectDecl's type temporarily, but currently
+		// VariableExprs have their own type list which is manipulated in AlternativeFinder (e.g. in inferRecursive).
+
+		// before resolving ctor/dtor, need to remove type qualifiers from the first argument (the object being constructed)
+		Expression * callExpr = InitTweak::getCtorDtorCall( impCtorDtorStmt );
+		assert( callExpr );
+		Expression * constructee = InitTweak::getCallArg( callExpr, 0 );
+		Type * type = 0;
+		if ( UntypedExpr * plusExpr = dynamic_cast< UntypedExpr * >( constructee ) ) {
+			// constructee is <array>+<index>
+			// get Variable <array>, then get the base type of the VariableExpr - this is the type that needs to be fixed
+			Expression * arr = InitTweak::getCallArg( plusExpr, 0 );
+			assert( dynamic_cast< VariableExpr * >( arr ) );
+			assert( arr && arr->get_results().size() == 1 );
+			ArrayType * arrType = dynamic_cast< ArrayType * >( arr->get_results().front() );
+			assert( arrType );
+			type = arrType->get_base();
+		} else {
+			// otherwise, constructing a plain object, which means the object's address is being taken.
+			// Need to get the type of the VariableExpr object, because the AddressExpr is rebuilt and uses the
+			// type of the VariableExpr to do so.
+			assert( constructee->get_results().size() == 1 );
+			AddressExpr * addrExpr = dynamic_cast< AddressExpr * > ( constructee );
+			assert( addrExpr );
+			VariableExpr * varExpr = dynamic_cast< VariableExpr * >( addrExpr->get_arg() );
+			assert( varExpr && varExpr->get_results().size() == 1 );
+			type = varExpr->get_results().front();
+		}
+		// remember qualifiers so they can be replaced
+		Type::Qualifiers qualifiers = type->get_qualifiers();
+
+		// unfortunately, lvalue is considered a qualifier. For AddressExpr to resolve, its argument
+		// must have an lvalue qualified type, so remove all qualifiers except lvalue. If we ever
+		// remove lvalue as a qualifier, this can change to
+		//   type->get_qualifiers() = Type::Qualifiers();
+		type->get_qualifiers() -= Type::Qualifiers(true, true, true, false, true, true);
+
+		// finally, resolve the ctor/dtor
+		impCtorDtorStmt->get_callStmt()->accept( *this );
+
+		// and reset type qualifiers after resolving
+		type->get_qualifiers() = qualifiers;
+	}
 } // namespace ResolvExpr
 
Index: src/SynTree/Initializer.cc
===================================================================
--- src/SynTree/Initializer.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/SynTree/Initializer.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -20,4 +20,7 @@
 
 Initializer::Initializer( bool maybeConstructed ) : maybeConstructed( maybeConstructed ) {}
+Initializer::Initializer( const Initializer & other ) : maybeConstructed( other.maybeConstructed ) {
+}
+
 
 Initializer::~Initializer() {}
@@ -39,7 +42,7 @@
 }
 
-SingleInit::~SingleInit() {}
-
-SingleInit *SingleInit::clone() const { return new SingleInit( *this); }
+SingleInit::~SingleInit() {
+	deleteAll(designators);
+}
 
 void SingleInit::print( std::ostream &os, int indent ) {
@@ -58,11 +61,10 @@
 
 ListInit::ListInit( const std::list<Initializer*> &_initializers, const std::list<Expression *> &_designators, bool maybeConstructed )
-	: Initializer( maybeConstructed), initializers( _initializers ), designators( _designators ) {
+	: Initializer( maybeConstructed ), initializers( _initializers ), designators( _designators ) {
 }
 
-ListInit::~ListInit() {}
-
-ListInit *ListInit::clone() const {
-	return new ListInit( *this );
+ListInit::~ListInit() {
+	deleteAll( initializers );
+	deleteAll( designators );
 }
 
@@ -85,11 +87,11 @@
 
 ConstructorInit::ConstructorInit( Statement * ctor, Statement * dtor, Initializer * init ) : Initializer( true ), ctor( ctor ), dtor( dtor ), init( init ) {}
+ConstructorInit::ConstructorInit( const ConstructorInit &other ) : Initializer( other ), ctor( maybeClone( other.ctor ) ), dtor( maybeClone( other.dtor ) ), init( maybeClone( other.init ) ) {
+}
+
 ConstructorInit::~ConstructorInit() {
 	delete ctor;
+	delete dtor;
 	delete init;
-}
-
-ConstructorInit *ConstructorInit::clone() const {
-	return new ConstructorInit( *this );
 }
 
Index: src/SynTree/Initializer.h
===================================================================
--- src/SynTree/Initializer.h	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/SynTree/Initializer.h	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -20,4 +20,5 @@
 #include "Visitor.h"
 #include "Mutator.h"
+#include "Type.h"
 
 #include <cassert>
@@ -28,4 +29,5 @@
 	//	Initializer( std::string _name = std::string(""), int _pos = 0 );
 	Initializer( bool maybeConstructed );
+	Initializer( const Initializer & other );
 	virtual ~Initializer();
 
@@ -68,5 +70,5 @@
 	std::list<Expression *> &get_designators() { return designators; }
 
-	virtual SingleInit *clone() const;
+	virtual SingleInit *clone() const { return new SingleInit( *this); }
 	virtual void accept( Visitor &v ) { v.visit( this ); }
 	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
@@ -94,5 +96,5 @@
 	std::list<Initializer*>::iterator end_initializers() { return initializers.end(); }
 
-	virtual ListInit *clone() const;
+	virtual ListInit *clone() const { return new ListInit( *this ); }
 	virtual void accept( Visitor &v ) { v.visit( this ); }
 	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
@@ -108,4 +110,5 @@
   public:
 	ConstructorInit( Statement * ctor, Statement * dtor, Initializer * init );
+	ConstructorInit( const ConstructorInit &other );
 	virtual ~ConstructorInit();
 
@@ -117,5 +120,5 @@
 	Initializer * get_init() const { return init; }
 
-	virtual ConstructorInit *clone() const;
+	ConstructorInit *clone() const { return new ConstructorInit( *this ); }
 	virtual void accept( Visitor &v ) { v.visit( this ); }
 	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
Index: src/SynTree/Mutator.cc
===================================================================
--- src/SynTree/Mutator.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/SynTree/Mutator.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -182,4 +182,9 @@
 }
 
+Statement *Mutator::mutate( ImplicitCtorDtorStmt *impCtorDtorStmt ) {
+	impCtorDtorStmt->set_callStmt( maybeMutate( impCtorDtorStmt->get_callStmt(), *this ) );
+	return impCtorDtorStmt;
+}
+
 Expression *Mutator::mutate( ApplicationExpr *applicationExpr ) {
 	mutateAll( applicationExpr->get_results(), *this );
Index: src/SynTree/Mutator.h
===================================================================
--- src/SynTree/Mutator.h	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/SynTree/Mutator.h	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -52,4 +52,5 @@
 	virtual NullStmt* mutate( NullStmt *nullStmt );
 	virtual Statement* mutate( DeclStmt *declStmt );
+	virtual Statement* mutate( ImplicitCtorDtorStmt *impCtorDtorStmt );
 
 	virtual Expression* mutate( ApplicationExpr *applicationExpr );
Index: src/SynTree/Statement.cc
===================================================================
--- src/SynTree/Statement.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/SynTree/Statement.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -358,5 +358,5 @@
 
 void CatchStmt::print( std::ostream &os, int indent ) const {
-	os << string( indent, ' ' ) << "Catch Statement" << endl;
+	os << "Catch Statement" << endl;
 
 	os << string( indent, ' ' ) << "... catching" << endl;
@@ -383,5 +383,5 @@
 
 void FinallyStmt::print( std::ostream &os, int indent ) const {
-	os << string( indent, ' ' ) << "Finally Statement" << endl;
+	os << "Finally Statement" << endl;
 	os << string( indent + 2, ' ' ) << "with block: " << endl;
 	block->print( os, indent + 4 );
@@ -393,4 +393,21 @@
 void NullStmt::print( std::ostream &os, int indent ) const {
 	os << "Null Statement" << endl ;
+}
+
+ImplicitCtorDtorStmt::ImplicitCtorDtorStmt( Statement * callStmt ) : Statement( std::list<Label>() ), callStmt( callStmt ) {
+	assert( callStmt );
+}
+
+ImplicitCtorDtorStmt::ImplicitCtorDtorStmt( const ImplicitCtorDtorStmt & other ) : Statement( other ), callStmt( other.callStmt ) {
+}
+
+ImplicitCtorDtorStmt::~ImplicitCtorDtorStmt() {
+}
+
+void ImplicitCtorDtorStmt::print( std::ostream &os, int indent ) const {
+	os << "Implicit Ctor Dtor Statement" << endl;
+	os << string( indent + 2, ' ' ) << "with Ctor/Dtor: ";
+	callStmt->print( os, indent + 2);
+	os << endl;
 }
 
Index: src/SynTree/Statement.h
===================================================================
--- src/SynTree/Statement.h	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/SynTree/Statement.h	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -21,4 +21,5 @@
 #include "Mutator.h"
 #include "Common/SemanticError.h"
+#include "Type.h"
 
 class Statement {
@@ -394,5 +395,5 @@
 	virtual ~DeclStmt();
 
-	Declaration *get_decl() { return decl; }
+	Declaration *get_decl() const { return decl; }
 	void set_decl( Declaration *newValue ) { decl = newValue; }
 
@@ -404,4 +405,28 @@
 	Declaration *decl;
 };
+
+
+/// represents an implicit application of a constructor or destructor. Qualifiers are replaced
+/// immediately before and after the call so that qualified objects can be constructed
+/// with the same functions as unqualified objects.
+class ImplicitCtorDtorStmt : public Statement {
+  public:
+	ImplicitCtorDtorStmt( Statement * callStmt );
+	ImplicitCtorDtorStmt( const ImplicitCtorDtorStmt & other );
+	virtual ~ImplicitCtorDtorStmt();
+
+	Statement *get_callStmt() const { return callStmt; }
+	void set_callStmt( Statement * newValue ) { callStmt = newValue; }
+
+	virtual ImplicitCtorDtorStmt *clone() const { return new ImplicitCtorDtorStmt( *this ); }
+	virtual void accept( Visitor &v ) { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const;
+
+  private:
+	// Non-owned pointer to the constructor/destructor statement
+	Statement * callStmt;
+};
+
 
 std::ostream & operator<<( std::ostream & out, Statement * statement );
Index: src/SynTree/SynTree.h
===================================================================
--- src/SynTree/SynTree.h	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/SynTree/SynTree.h	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -56,4 +56,5 @@
 class DeclStmt;
 class NullStmt;
+class ImplicitCtorDtorStmt;
 
 class Expression;
Index: src/SynTree/Type.cc
===================================================================
--- src/SynTree/Type.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/SynTree/Type.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Type.cc -- 
+// Type.cc --
 //
 // Author           : Richard C. Bilson
@@ -54,4 +54,25 @@
 }
 
+void Type::Qualifiers::print( std::ostream &os, int indent ) const {
+	if ( isConst ) {
+		os << "const ";
+	} // if
+	if ( isVolatile ) {
+		os << "volatile ";
+	} // if
+	if ( isRestrict ) {
+		os << "restrict ";
+	} // if
+	if ( isLvalue ) {
+		os << "lvalue ";
+	} // if
+	if ( isAtomic ) {
+		os << "_Atomic ";
+	} // if
+	if ( isAttribute ) {
+		os << "__attribute(( )) ";
+	} // if
+}
+
 void Type::print( std::ostream &os, int indent ) const {
 	if ( ! forall.empty() ) {
@@ -60,22 +81,5 @@
 		os << std::string( indent+2, ' ' );
 	} // if
-	if ( tq.isConst ) {
-		os << "const ";
-	} // if
-	if ( tq.isVolatile ) {
-		os << "volatile ";
-	} // if
-	if ( tq.isRestrict ) {
-		os << "restrict ";
-	} // if
-	if ( tq.isLvalue ) {
-		os << "lvalue ";
-	} // if
-	if ( tq.isAtomic ) {
-		os << "_Atomic ";
-	} // if
-	if ( tq.isAttribute ) {
-		os << "__attribute(( )) ";
-	} // if
+	tq.print( os, indent );
 }
 
Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/SynTree/Type.h	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -36,4 +36,5 @@
 		bool operator<( const Qualifiers &other );
 		bool operator>( const Qualifiers &other );
+		void print( std::ostream &os, int indent = 0 ) const;
 
 		bool isConst;
Index: src/SynTree/Visitor.cc
===================================================================
--- src/SynTree/Visitor.cc	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/SynTree/Visitor.cc	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -152,4 +152,8 @@
 }
 
+void Visitor::visit( ImplicitCtorDtorStmt *impCtorDtorStmt ) {
+	maybeAccept( impCtorDtorStmt->get_callStmt(), *this );
+}
+
 void Visitor::visit( ApplicationExpr *applicationExpr ) {
 	acceptAll( applicationExpr->get_results(), *this );
Index: src/SynTree/Visitor.h
===================================================================
--- src/SynTree/Visitor.h	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/SynTree/Visitor.h	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -52,4 +52,5 @@
 	virtual void visit( NullStmt *nullStmt );
 	virtual void visit( DeclStmt *declStmt );
+	virtual void visit( ImplicitCtorDtorStmt *impCtorDtorStmt );
 
 	virtual void visit( ApplicationExpr *applicationExpr );
Index: src/examples/avltree/avl-private.h
===================================================================
--- src/examples/avltree/avl-private.h	(revision aec9a67c172f848c5b3764e18d4608afc6b7712f)
+++ src/examples/avltree/avl-private.h	(revision e01bfbcfdafdd2ca974dbd0cd8a6c22f62609103)
@@ -1,2 +1,3 @@
+#ifndef AVL_PRIVATE_H
 #include "avl.h"
 
@@ -13,2 +14,4 @@
 forall(otype K | Comparable(K), otype V)
 int height(tree(K, V) * t);
+
+#endif
