Index: src/InitTweak/RemoveInit.cc
===================================================================
--- src/InitTweak/RemoveInit.cc	(revision d63eeb0d6eeb995b4c8c414f1d4989b0189ef8ca)
+++ src/InitTweak/RemoveInit.cc	(revision 071a31a897b52a4c1abdb6c4c2536e3bfe6257fb)
@@ -192,16 +192,24 @@
 		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 ) );
+				if ( ArrayType * at = dynamic_cast< ArrayType * >( objDecl->get_type() ) ) {
+					// call into makeArrayFunction from validate.cc to generate calls to ctor/dtor for each element of array
+				} else {
+					// it's sufficient to attempt to call the ctor/dtor for the given object and its initializer
+					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
+				// this can be done by mangling main and replacing it with our own main which calls each
+				// module initialization routine in some decided order (order given in link command?)
+				// and finally calls mangled main
 			}
 		}
