Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 68f9c43ecf1873cbb5f06aee682704b56612ed16)
+++ src/GenPoly/Box.cc	(revision bfc78119c41ed230f80fe0326923335e58b5a745)
@@ -279,11 +279,12 @@
 	/// Adds parameters for otype layout to a function type
 	void addOtypeParams( FunctionType *layoutFnType, std::list< TypeDecl* > &otypeParams ) {
-		BasicType sizeAlignType( Type::Qualifiers(), BasicType::LongUnsignedInt );
-
-		for ( std::list< TypeDecl* >::const_iterator param = otypeParams.begin(); param != otypeParams.end(); ++param ) {
+		auto sizeAlignType = new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt );
+
+		for ( std::list< TypeDecl* >::const_iterator param = otypeParams.begin(); 
+				param != otypeParams.end(); ++param ) {
 			TypeInstType paramType( Type::Qualifiers(), (*param)->get_name(), *param );
 			std::string paramName = mangleType( &paramType );
-			layoutFnType->get_parameters().push_back( new ObjectDecl( sizeofName( paramName ), Type::StorageClasses(), LinkageSpec::Cforall, 0, sizeAlignType.clone(), 0 ) );
-			layoutFnType->get_parameters().push_back( new ObjectDecl( alignofName( paramName ), Type::StorageClasses(), LinkageSpec::Cforall, 0, sizeAlignType.clone(), 0 ) );
+			layoutFnType->get_parameters().push_back( new ObjectDecl( sizeofName( paramName ), Type::StorageClasses(), LinkageSpec::Cforall, 0, sizeAlignType->clone(), 0 ) );
+			layoutFnType->get_parameters().push_back( new ObjectDecl( alignofName( paramName ), Type::StorageClasses(), LinkageSpec::Cforall, 0, sizeAlignType->clone(), 0 ) );
 		}
 	}
@@ -740,5 +741,6 @@
 				Type * newType = param->clone();
 				if ( env ) env->apply( newType );
-				ObjectDecl *newObj = ObjectDecl::newObject( tempNamer.newName(), newType, nullptr );
+				ObjectDecl *newObj = ObjectDecl::newObject( 
+					tempNamer.newName(), newType, nullptr );
 				newObj->get_type()->get_qualifiers() = Type::Qualifiers(); // TODO: is this right???
 				stmtsToAddBefore.push_back( new DeclStmt( newObj ) );
@@ -1325,9 +1327,14 @@
 			std::list< DeclarationWithType *> inferredParams;
 			// size/align/offset parameters may not be used in body, pass along with unused attribute.
-			ObjectDecl newObj( "", Type::StorageClasses(), LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0,
-			                   { new Attribute( "unused" ) } );
-			ObjectDecl newPtr( "", Type::StorageClasses(), LinkageSpec::C, 0,
-			                   new PointerType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ) ), 0 );
-			for ( Type::ForallList::const_iterator tyParm = funcType->get_forall().begin(); tyParm != funcType->get_forall().end(); ++tyParm ) {
+			auto newObj = new ObjectDecl(
+				"", Type::StorageClasses(), LinkageSpec::C, 0, 
+				new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0,
+			    { new Attribute( "unused" ) } );
+			auto newPtr = new ObjectDecl(
+				"", Type::StorageClasses(), LinkageSpec::C, 0,
+			    new PointerType( Type::Qualifiers(), 
+					new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ) ), 0 );
+			for ( Type::ForallList::const_iterator tyParm = funcType->get_forall().begin(); 
+					tyParm != funcType->get_forall().end(); ++tyParm ) {
 				ObjectDecl *sizeParm, *alignParm;
 				// add all size and alignment parameters to parameter list
@@ -1336,10 +1343,10 @@
 					std::string parmName = mangleType( &parmType );
 
-					sizeParm = newObj.clone();
+					sizeParm = newObj->clone();
 					sizeParm->set_name( sizeofName( parmName ) );
 					last = funcType->get_parameters().insert( last, sizeParm );
 					++last;
 
-					alignParm = newObj.clone();
+					alignParm = newObj->clone();
 					alignParm->set_name( alignofName( parmName ) );
 					last = funcType->get_parameters().insert( last, alignParm );
@@ -1364,10 +1371,10 @@
 
 					ObjectDecl *sizeParm, *alignParm, *offsetParm;
-					sizeParm = newObj.clone();
+					sizeParm = newObj->clone();
 					sizeParm->set_name( sizeofName( typeName ) );
 					last = funcType->get_parameters().insert( last, sizeParm );
 					++last;
 
-					alignParm = newObj.clone();
+					alignParm = newObj->clone();
 					alignParm->set_name( alignofName( typeName ) );
 					last = funcType->get_parameters().insert( last, alignParm );
@@ -1377,5 +1384,5 @@
 						// NOTE zero-length arrays are illegal in C, so empty structs have no offset array
 						if ( ! polyBaseStruct->get_baseStruct()->get_members().empty() ) {
-							offsetParm = newPtr.clone();
+							offsetParm = newPtr->clone();
 							offsetParm->set_name( offsetofName( typeName ) );
 							last = funcType->get_parameters().insert( last, offsetParm );
@@ -1614,5 +1621,6 @@
 
 		ObjectDecl *PolyGenericCalculator::makeVar( const std::string &name, Type *type, Initializer *init ) {
-			ObjectDecl *newObj = new ObjectDecl( name, Type::StorageClasses(), LinkageSpec::C, nullptr, type, init );
+			ObjectDecl *newObj = new ObjectDecl( 
+				name, Type::StorageClasses(), LinkageSpec::C, nullptr, type, init );
 			stmtsToAddBefore.push_back( new DeclStmt( newObj ) );
 			return newObj;
