Index: src/CodeGen/FixNames.cc
===================================================================
--- src/CodeGen/FixNames.cc	(revision 50377a4f7ed2666db8f0a606e0e8573661478734)
+++ src/CodeGen/FixNames.cc	(revision a117f7c8c1b582839efb906967e6dda9e0840614)
@@ -66,9 +66,9 @@
 		);
 
-		mainDecl->get_functionType()->get_parameters().push_back(
+		main_type->get_parameters().push_back(
 			new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr )
 		);
 
-		mainDecl->get_functionType()->get_parameters().push_back(
+		main_type->get_parameters().push_back(
 			new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, 0,
 			new PointerType( Type::Qualifiers(), new PointerType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::Char ) ) ),
