Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/CodeGen/CodeGenerator.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -1238,16 +1238,4 @@
 } // namespace CodeGen
 
-
-unsigned Indenter::tabsize = 2;
-
-std::ostream & operator<<( std::ostream & out, const BaseSyntaxNode * node ) {
-	if ( node ) {
-		node->print( out );
-	} else {
-		out << "nullptr";
-	}
-	return out;
-}
-
 // Local Variables: //
 // tab-width: 4 //
Index: src/CodeGen/FixMain.cc
===================================================================
--- src/CodeGen/FixMain.cc	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/CodeGen/FixMain.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -49,6 +49,4 @@
 
 }
-
-	bool FixMain::replace_main = false;
 
 	template<typename container>
Index: src/CodeGen/FixMain2.cc
===================================================================
--- src/CodeGen/FixMain2.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
+++ src/CodeGen/FixMain2.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -0,0 +1,28 @@
+//
+// 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.
+//
+// FixMain2.cc -- A side file used to seperate the compiler and demangler.
+//
+// Author           : Andrew Beach
+// Created On       : Tue May 17 10:05:00 2022
+// Last Modified By : Andrew Beach
+// Last Modified On : Tue May 17 10:08:00 2022
+// Update Count     : 0
+//
+
+#include "FixMain.h"
+
+namespace CodeGen {
+
+bool FixMain::replace_main = false;
+
+} // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/CodeGen/module.mk
===================================================================
--- src/CodeGen/module.mk	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/CodeGen/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,25 +10,28 @@
 ## Author           : Richard C. Bilson
 ## Created On       : Mon Jun  1 17:49:17 2015
-## Last Modified By : Peter A. Buhr
-## Last Modified On : Sat Dec 14 07:29:42 2019
-## Update Count     : 4
+## Last Modified By : Andrew Beach
+## Last Modified On : Tue May 17 14:26:00 2022
+## Update Count     : 5
 ###############################################################################
 
-#SRC +=  ArgTweak/Rewriter.cc \
-#	ArgTweak/Mutate.cc
+SRC_CODEGEN = \
+	CodeGen/FixMain2.cc \
+	CodeGen/FixMain.h \
+	CodeGen/OperatorTable.cc \
+	CodeGen/OperatorTable.h
 
-SRC_CODEGEN = \
+SRC += $(SRC_CODEGEN) \
 	CodeGen/CodeGenerator.cc \
 	CodeGen/CodeGenerator.h \
+	CodeGen/Generate.cc \
+	CodeGen/Generate.h \
 	CodeGen/FixMain.cc \
-	CodeGen/FixMain.h \
+	CodeGen/FixNames.cc \
+	CodeGen/FixNames.h \
 	CodeGen/GenType.cc \
 	CodeGen/GenType.h \
 	CodeGen/LinkOnce.cc \
 	CodeGen/LinkOnce.h \
-	CodeGen/OperatorTable.cc \
-	CodeGen/OperatorTable.h \
 	CodeGen/Options.h
 
-SRC += $(SRC_CODEGEN) CodeGen/Generate.cc CodeGen/Generate.h CodeGen/FixNames.cc CodeGen/FixNames.h
 SRCDEMANGLE += $(SRC_CODEGEN)
Index: src/Common/Indenter.cc
===================================================================
--- src/Common/Indenter.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
+++ src/Common/Indenter.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -0,0 +1,24 @@
+//
+// 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.
+//
+// Indenter.cc --
+//
+// Author           : Andrew Beach
+// Created On       : Fri May 13 14:03:00 2022
+// Last Modified By : Andrew Beach
+// Last Modified On : Fri May 13 14:03:00 2022
+// Update Count     : 0
+//
+
+#include "Indenter.h"
+
+unsigned Indenter::tabsize = 2;
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/Common/Indenter.h
===================================================================
--- src/Common/Indenter.h	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/Common/Indenter.h	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,10 +10,11 @@
 // Created On       : Fri Jun 30 16:55:23 2017
 // Last Modified By : Andrew Beach
-// Last Modified On : Fri Aug 11 11:15:00 2017
-// Update Count     : 1
+// Last Modified On : Fri May 13 14:10:00 2022
+// Update Count     : 2
 //
 
-#ifndef INDENTER_H
-#define INDENTER_H
+#pragma once
+
+#include <ostream>
 
 struct Indenter {
@@ -37,4 +38,2 @@
 	return out << std::string(indent.indent * indent.amt, ' ');
 }
-
-#endif // INDENTER_H
Index: src/Common/module.mk
===================================================================
--- src/Common/module.mk	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/Common/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,51 +10,54 @@
 ## Author           : Richard C. Bilson
 ## Created On       : Mon Jun  1 17:49:17 2015
-## Last Modified By : Peter A. Buhr
-## Last Modified On : Tue Sep 27 11:06:38 2016
-## Update Count     : 4
+## Last Modified By : Andrew Beach
+## Last Modified On : Tue May 17 14:27:00 2022
+## Update Count     : 5
 ###############################################################################
 
 SRC_COMMON = \
-      Common/Assert.cc \
-      Common/CodeLocation.h \
-      Common/CodeLocationTools.hpp \
-      Common/CodeLocationTools.cpp \
-      Common/CompilerError.h \
-      Common/Debug.h \
-      Common/DeclStats.hpp \
-      Common/DeclStats.cpp \
-      Common/ErrorObjects.h \
-      Common/Eval.cc \
-      Common/Examine.cc \
-      Common/Examine.h \
-      Common/FilterCombos.h \
-      Common/Indenter.h \
-      Common/PassVisitor.cc \
-      Common/PassVisitor.h \
-      Common/PassVisitor.impl.h \
-      Common/PassVisitor.proto.h \
-      Common/PersistentMap.h \
-      Common/ResolvProtoDump.hpp \
-      Common/ResolvProtoDump.cpp \
-      Common/ScopedMap.h \
-      Common/SemanticError.cc \
-      Common/SemanticError.h \
-      Common/Stats.h \
-      Common/Stats/Base.h \
-      Common/Stats/Counter.cc \
-      Common/Stats/Counter.h \
-      Common/Stats/Heap.cc \
-      Common/Stats/Heap.h \
-      Common/Stats/ResolveTime.cc \
-      Common/Stats/ResolveTime.h \
-      Common/Stats/Stats.cc \
-      Common/Stats/Time.cc \
-      Common/Stats/Time.h \
-      Common/UnimplementedError.h \
-      Common/UniqueName.cc \
-      Common/UniqueName.h \
-      Common/utility.h \
-      Common/VectorMap.h
+	Common/Assert.cc \
+	Common/CodeLocation.h \
+	Common/CodeLocationTools.hpp \
+	Common/CodeLocationTools.cpp \
+	Common/CompilerError.h \
+	Common/Debug.h \
+	Common/DeclStats.hpp \
+	Common/DeclStats.cpp \
+	Common/ErrorObjects.h \
+	Common/Eval.cc \
+	Common/Examine.cc \
+	Common/Examine.h \
+	Common/FilterCombos.h \
+	Common/Indenter.h \
+	Common/Indenter.cc \
+	Common/PassVisitor.cc \
+	Common/PassVisitor.h \
+	Common/PassVisitor.impl.h \
+	Common/PassVisitor.proto.h \
+	Common/PersistentMap.h \
+	Common/ResolvProtoDump.hpp \
+	Common/ResolvProtoDump.cpp \
+	Common/ScopedMap.h \
+	Common/SemanticError.cc \
+	Common/SemanticError.h \
+	Common/Stats.h \
+	Common/Stats/Base.h \
+	Common/Stats/Counter.cc \
+	Common/Stats/Counter.h \
+	Common/Stats/Heap.cc \
+	Common/Stats/Heap.h \
+	Common/Stats/ResolveTime.cc \
+	Common/Stats/ResolveTime.h \
+	Common/Stats/Stats.cc \
+	Common/Stats/Time.cc \
+	Common/Stats/Time.h \
+	Common/UnimplementedError.h \
+	Common/UniqueName.cc \
+	Common/UniqueName.h \
+	Common/utility.h \
+	Common/VectorMap.h
 
-SRC += $(SRC_COMMON) Common/DebugMalloc.cc
+SRC += $(SRC_COMMON) \
+	Common/DebugMalloc.cc
+
 SRCDEMANGLE += $(SRC_COMMON)
Index: src/Concurrency/module.mk
===================================================================
--- src/Concurrency/module.mk	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/Concurrency/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,18 +10,13 @@
 ## Author           : Thierry Delisle
 ## Created On       : Mon Mar 13 12:48:40 2017
-## Last Modified By :
-## Last Modified On :
-## Update Count     : 0
+## Last Modified By : Andrew Beach
+## Last Modified On : Tue May 17 13:28:00 2022
+## Update Count     : 1
 ###############################################################################
 
-SRC_CONCURRENCY = \
+SRC += \
 	Concurrency/KeywordsNew.cpp \
-	Concurrency/Keywords.cc
-
-SRC += $(SRC_CONCURRENCY) \
+	Concurrency/Keywords.cc \
 	Concurrency/Keywords.h \
 	Concurrency/Waitfor.cc \
 	Concurrency/Waitfor.h
-
-SRCDEMANGLE += $(SRC_CONCURRENCY)
-
Index: src/ControlStruct/module.mk
===================================================================
--- src/ControlStruct/module.mk	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/ControlStruct/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,12 +10,15 @@
 ## Author           : Richard C. Bilson
 ## Created On       : Mon Jun  1 17:49:17 2015
-## Last Modified By : Peter A. Buhr
-## Last Modified On : Sat Jan 29 12:04:19 2022
-## Update Count     : 7
+## Last Modified By : Andrew Beach
+## Last Modified On : Tue May 17 14:30:00 2022
+## Update Count     : 8
 ###############################################################################
 
-SRC_CONTROLSTRUCT = \
+SRC += \
 	ControlStruct/ExceptDecl.cc \
 	ControlStruct/ExceptDecl.h \
+	ControlStruct/ExceptTranslateNew.cpp \
+	ControlStruct/ExceptTranslate.cc \
+	ControlStruct/ExceptTranslate.h \
 	ControlStruct/FixLabels.cpp \
 	ControlStruct/FixLabels.hpp \
@@ -37,9 +40,2 @@
 	ControlStruct/Mutate.h
 
-SRC += $(SRC_CONTROLSTRUCT) \
-	ControlStruct/ExceptTranslateNew.cpp \
-	ControlStruct/ExceptTranslate.cc \
-	ControlStruct/ExceptTranslate.h
-
-SRCDEMANGLE += $(SRC_CONTROLSTRUCT)
-
Index: src/GenPoly/Lvalue.cc
===================================================================
--- src/GenPoly/Lvalue.cc	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/GenPoly/Lvalue.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -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 Dec 13 23:14:38 2019
-// Update Count     : 7
+// Last Modified By : Andrew Beach
+// Last Modified On : Mon May 16 14:09:00 2022
+// Update Count     : 8
 //
 
@@ -125,9 +125,6 @@
 	} // namespace
 
-	static bool referencesEliminated = false;
-	// used by UntypedExpr::createDeref to determine whether result type of dereference should be ReferenceType or value type.
-	bool referencesPermissable() {
-		return ! referencesEliminated;
-	}
+	// Stored elsewhere (Lvalue2, initially false).
+	extern bool referencesEliminated;
 
 	void convertLvalue( std::list< Declaration* > & translationUnit ) {
Index: src/GenPoly/Lvalue2.cc
===================================================================
--- src/GenPoly/Lvalue2.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
+++ src/GenPoly/Lvalue2.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -0,0 +1,26 @@
+//
+// 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.
+//
+// Lvalue2.cc -- Seperate Lvalue module for linking.
+//
+// Author           : Andrew Beach
+// Created On       : Mon May 16 14:05:00 2022
+// Last Modified By : Andrew Beach
+// Last Modified On : Mon May 16 14:05:00 2022
+// Update Count     : 0
+//
+
+namespace GenPoly {
+
+bool referencesEliminated = false;
+
+/// Are reference types still allowed in the AST?
+bool referencesPermissable() {
+	return !referencesEliminated;
+}
+
+
+}
Index: src/GenPoly/module.mk
===================================================================
--- src/GenPoly/module.mk	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/GenPoly/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,26 +10,29 @@
 ## Author           : Richard C. Bilson
 ## Created On       : Mon Jun  1 17:49:17 2015
-## Last Modified By : Peter A. Buhr
-## Last Modified On : Mon Jun  1 17:52:30 2015
-## Update Count     : 1
+## Last Modified By : Andrew Beach
+## Last Modified On : Tue May 17 14:31:00 2022
+## Update Count     : 2
 ###############################################################################
 
-SRC += GenPoly/Box.cc \
-       GenPoly/Box.h \
-       GenPoly/ErasableScopedMap.h \
-       GenPoly/FindFunction.cc \
-       GenPoly/FindFunction.h \
-       GenPoly/GenPoly.cc \
-       GenPoly/GenPoly.h \
-       GenPoly/InstantiateGeneric.cc \
-       GenPoly/InstantiateGeneric.h \
-       GenPoly/Lvalue.cc \
-       GenPoly/Lvalue.h \
-       GenPoly/ScopedSet.h \
-       GenPoly/ScrubTyVars.cc \
-       GenPoly/ScrubTyVars.h \
-       GenPoly/Specialize.cc \
-       GenPoly/Specialize.h
+SRC_GENPOLY = \
+	GenPoly/GenPoly.cc \
+	GenPoly/GenPoly.h \
+	GenPoly/Lvalue2.cc \
+	GenPoly/Lvalue.h
 
-SRCDEMANGLE += GenPoly/GenPoly.cc GenPoly/GenPoly.h GenPoly/Lvalue.cc GenPoly/Lvalue.h
+SRC += $(SRC_GENPOLY) \
+	GenPoly/Box.cc \
+	GenPoly/Box.h \
+	GenPoly/ErasableScopedMap.h \
+	GenPoly/FindFunction.cc \
+	GenPoly/FindFunction.h \
+	GenPoly/InstantiateGeneric.cc \
+	GenPoly/InstantiateGeneric.h \
+	GenPoly/Lvalue.cc \
+	GenPoly/ScopedSet.h \
+	GenPoly/ScrubTyVars.cc \
+	GenPoly/ScrubTyVars.h \
+	GenPoly/Specialize.cc \
+	GenPoly/Specialize.h
 
+SRCDEMANGLE += $(SRC_GENPOLY)
Index: src/InitTweak/module.mk
===================================================================
--- src/InitTweak/module.mk	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/InitTweak/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,21 +10,10 @@
 ## Author           : Richard C. Bilson
 ## Created On       : Mon Jun  1 17:49:17 2015
-## Last Modified By : Rob Schluntz
-## Last Modified On : Fri May 13 11:36:24 2016
-## Update Count     : 3
+## Last Modified By : Andrew Beach
+## Last Modified On : Tue May 17 14:31:00 2022
+## Update Count     : 4
 ###############################################################################
 
-SRC += \
-	InitTweak/FixGlobalInit.cc \
-	InitTweak/FixGlobalInit.h \
-	InitTweak/FixInit.cc \
-	InitTweak/FixInit.h \
-	InitTweak/GenInit.cc \
-	InitTweak/GenInit.h \
-	InitTweak/InitTweak.cc \
-	InitTweak/InitTweak.h \
-	InitTweak/FixInitNew.cpp
-
-SRCDEMANGLE += \
+SRC_INITTWEAK = \
 	InitTweak/GenInit.cc \
 	InitTweak/GenInit.h \
@@ -32,2 +21,10 @@
 	InitTweak/InitTweak.h
 
+SRC += $(SRC_INITTWEAK) \
+	InitTweak/FixGlobalInit.cc \
+	InitTweak/FixGlobalInit.h \
+	InitTweak/FixInit.cc \
+	InitTweak/FixInit.h \
+	InitTweak/FixInitNew.cpp
+
+SRCDEMANGLE += $(SRC_INITTWEAK)
Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -42,5 +42,5 @@
 #include "SymTab/Indexer.h"        // for Indexer
 #include "SymTab/Mangler.h"        // for Mangler
-#include "SymTab/Validate.h"       // for validateType
+#include "SymTab/ValidateType.h"   // for validateType
 #include "SynTree/Constant.h"      // for Constant
 #include "SynTree/Declaration.h"   // for DeclarationWithType, TypeDecl, Dec...
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/SymTab/Validate.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,6 +10,6 @@
 // Created On       : Sun May 17 21:50:04 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Fri Apr 29  9:45:00 2022
-// Update Count     : 365
+// Last Modified On : Tue May 17 14:36:00 2022
+// Update Count     : 366
 //
 
@@ -74,4 +74,5 @@
 #include "ResolvExpr/ResolveTypeof.h"  // for resolveTypeof
 #include "SymTab/Autogen.h"            // for SizeType
+#include "SymTab/ValidateType.h"       // for decayEnumsAndPointers, decayFo...
 #include "SynTree/LinkageSpec.h"       // for C
 #include "SynTree/Attribute.h"         // for noAttributes, Attribute
@@ -134,46 +135,4 @@
 	};
 
-	/// Replaces enum types by int, and function or array types in function parameter and return lists by appropriate pointers.
-	struct EnumAndPointerDecay_old {
-		void previsit( EnumDecl * aggregateDecl );
-		void previsit( FunctionType * func );
-	};
-
-	/// Associates forward declarations of aggregates with their definitions
-	struct LinkReferenceToTypes_old final : public WithIndexer, public WithGuards, public WithVisitorRef<LinkReferenceToTypes_old>, public WithShortCircuiting {
-		LinkReferenceToTypes_old( const Indexer * indexer );
-
-		void postvisit( TypeInstType * typeInst );
-
-		void postvisit( EnumInstType * enumInst );
-		void postvisit( StructInstType * structInst );
-		void postvisit( UnionInstType * unionInst );
-		void postvisit( TraitInstType * traitInst );
-		void previsit( QualifiedType * qualType );
-		void postvisit( QualifiedType * qualType );
-
-		void postvisit( EnumDecl * enumDecl );
-		void postvisit( StructDecl * structDecl );
-		void postvisit( UnionDecl * unionDecl );
-		void postvisit( TraitDecl * traitDecl );
-
-		void previsit( StructDecl * structDecl );
-		void previsit( UnionDecl * unionDecl );
-
-		void renameGenericParams( std::list< TypeDecl * > & params );
-
-	  private:
-		const Indexer * local_indexer;
-
-		typedef std::map< std::string, std::list< EnumInstType * > > ForwardEnumsType;
-		typedef std::map< std::string, std::list< StructInstType * > > ForwardStructsType;
-		typedef std::map< std::string, std::list< UnionInstType * > > ForwardUnionsType;
-		ForwardEnumsType forwardEnums;
-		ForwardStructsType forwardStructs;
-		ForwardUnionsType forwardUnions;
-		/// true if currently in a generic type body, so that type parameter instances can be renamed appropriately
-		bool inGeneric = false;
-	};
-
 	/// Does early resolution on the expressions that give enumeration constants their values
 	struct ResolveEnumInitializers final : public WithIndexer, public WithGuards, public WithVisitorRef<ResolveEnumInitializers>, public WithShortCircuiting {
@@ -193,26 +152,4 @@
 		void previsit( StructDecl * aggrDecl );
 		void previsit( UnionDecl * aggrDecl );
-	};
-
-	// These structs are the sub-sub-passes of ForallPointerDecay_old.
-
-	struct TraitExpander_old final {
-		void previsit( FunctionType * );
-		void previsit( StructDecl * );
-		void previsit( UnionDecl * );
-	};
-
-	struct AssertionFixer_old final {
-		void previsit( FunctionType * );
-		void previsit( StructDecl * );
-		void previsit( UnionDecl * );
-	};
-
-	struct CheckOperatorTypes_old final {
-		void previsit( ObjectDecl * );
-	};
-
-	struct FixUniqueIds_old final {
-		void previsit( DeclarationWithType * );
 	};
 
@@ -358,5 +295,4 @@
 
 	void validate_A( std::list< Declaration * > & translationUnit ) {
-		PassVisitor<EnumAndPointerDecay_old> epc;
 		PassVisitor<HoistTypeDecls> hoistDecls;
 		{
@@ -367,11 +303,6 @@
 			ReplaceTypedef::replaceTypedef( translationUnit );
 			ReturnTypeFixer::fix( translationUnit ); // must happen before autogen
-			acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist; before LinkReferenceToTypes_old because it is an indexer and needs correct types for mangling
-		}
-	}
-
-	void linkReferenceToTypes( std::list< Declaration * > & translationUnit ) {
-		PassVisitor<LinkReferenceToTypes_old> lrt( nullptr );
-		acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions
+			decayEnumsAndPointers( translationUnit ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist; before LinkReferenceToTypes_old because it is an indexer and needs correct types for mangling
+		}
 	}
 
@@ -412,15 +343,4 @@
 			});
 		}
-	}
-
-	static void decayForallPointers( std::list< Declaration * > & translationUnit ) {
-		PassVisitor<TraitExpander_old> te;
-		acceptAll( translationUnit, te );
-		PassVisitor<AssertionFixer_old> af;
-		acceptAll( translationUnit, af );
-		PassVisitor<CheckOperatorTypes_old> cot;
-		acceptAll( translationUnit, cot );
-		PassVisitor<FixUniqueIds_old> fui;
-		acceptAll( translationUnit, fui );
 	}
 
@@ -501,19 +421,4 @@
 	}
 
-	void validateType( Type * type, const Indexer * indexer ) {
-		PassVisitor<EnumAndPointerDecay_old> epc;
-		PassVisitor<LinkReferenceToTypes_old> lrt( indexer );
-		PassVisitor<TraitExpander_old> te;
-		PassVisitor<AssertionFixer_old> af;
-		PassVisitor<CheckOperatorTypes_old> cot;
-		PassVisitor<FixUniqueIds_old> fui;
-		type->accept( epc );
-		type->accept( lrt );
-		type->accept( te );
-		type->accept( af );
-		type->accept( cot );
-		type->accept( fui );
-	}
-
 	void HoistTypeDecls::handleType( Type * type ) {
 		// some type declarations are buried in expressions and not easy to hoist during parsing; hoist them here
@@ -708,124 +613,4 @@
 	}
 
-	void EnumAndPointerDecay_old::previsit( EnumDecl * enumDecl ) {
-		// Set the type of each member of the enumeration to be EnumConstant
-		for ( std::list< Declaration * >::iterator i = enumDecl->members.begin(); i != enumDecl->members.end(); ++i ) {
-			ObjectDecl * obj = dynamic_cast< ObjectDecl * >( * i );
-			assert( obj );
-			obj->set_type( new EnumInstType( Type::Qualifiers( Type::Const ), enumDecl->name ) );
-		} // for
-	}
-
-	namespace {
-		template< typename DWTList >
-		void fixFunctionList( DWTList & dwts, bool isVarArgs, FunctionType * func ) {
-			auto nvals = dwts.size();
-			bool containsVoid = false;
-			for ( auto & dwt : dwts ) {
-				// fix each DWT and record whether a void was found
-				containsVoid |= fixFunction( dwt );
-			}
-
-			// the only case in which "void" is valid is where it is the only one in the list
-			if ( containsVoid && ( nvals > 1 || isVarArgs ) ) {
-				SemanticError( func, "invalid type void in function type " );
-			}
-
-			// one void is the only thing in the list; remove it.
-			if ( containsVoid ) {
-				delete dwts.front();
-				dwts.clear();
-			}
-		}
-	}
-
-	void EnumAndPointerDecay_old::previsit( FunctionType * func ) {
-		// Fix up parameters and return types
-		fixFunctionList( func->parameters, func->isVarArgs, func );
-		fixFunctionList( func->returnVals, false, func );
-	}
-
-	LinkReferenceToTypes_old::LinkReferenceToTypes_old( const Indexer * other_indexer ) : WithIndexer( false ) {
-		if ( other_indexer ) {
-			local_indexer = other_indexer;
-		} else {
-			local_indexer = &indexer;
-		} // if
-	}
-
-	void LinkReferenceToTypes_old::postvisit( EnumInstType * enumInst ) {
-		const EnumDecl * st = local_indexer->lookupEnum( enumInst->name );
-		// it's not a semantic error if the enum is not found, just an implicit forward declaration
-		if ( st ) {
-			enumInst->baseEnum = const_cast<EnumDecl *>(st); // Just linking in the node
-		} // if
-		if ( ! st || ! st->body ) {
-			// use of forward declaration
-			forwardEnums[ enumInst->name ].push_back( enumInst );
-		} // if
-	}
-	void LinkReferenceToTypes_old::postvisit( StructInstType * structInst ) {
-		const StructDecl * st = local_indexer->lookupStruct( structInst->name );
-		// it's not a semantic error if the struct is not found, just an implicit forward declaration
-		if ( st ) {
-			structInst->baseStruct = const_cast<StructDecl *>(st); // Just linking in the node
-		} // if
-		if ( ! st || ! st->body ) {
-			// use of forward declaration
-			forwardStructs[ structInst->name ].push_back( structInst );
-		} // if
-	}
-
-	void LinkReferenceToTypes_old::postvisit( UnionInstType * unionInst ) {
-		const UnionDecl * un = local_indexer->lookupUnion( unionInst->name );
-		// it's not a semantic error if the union is not found, just an implicit forward declaration
-		if ( un ) {
-			unionInst->baseUnion = const_cast<UnionDecl *>(un); // Just linking in the node
-		} // if
-		if ( ! un || ! un->body ) {
-			// use of forward declaration
-			forwardUnions[ unionInst->name ].push_back( unionInst );
-		} // if
-	}
-
-	void LinkReferenceToTypes_old::previsit( QualifiedType * ) {
-		visit_children = false;
-	}
-
-	void LinkReferenceToTypes_old::postvisit( QualifiedType * qualType ) {
-		// linking only makes sense for the 'oldest ancestor' of the qualified type
-		qualType->parent->accept( * visitor );
-	}
-
-	template< typename Decl >
-	void normalizeAssertions( std::list< Decl * > & assertions ) {
-		// ensure no duplicate trait members after the clone
-		auto pred = [](Decl * d1, Decl * d2) {
-			// only care if they're equal
-			DeclarationWithType * dwt1 = dynamic_cast<DeclarationWithType *>( d1 );
-			DeclarationWithType * dwt2 = dynamic_cast<DeclarationWithType *>( d2 );
-			if ( dwt1 && dwt2 ) {
-				if ( dwt1->name == dwt2->name && ResolvExpr::typesCompatible( dwt1->get_type(), dwt2->get_type(), SymTab::Indexer() ) ) {
-					// std::cerr << "=========== equal:" << std::endl;
-					// std::cerr << "d1: " << d1 << std::endl;
-					// std::cerr << "d2: " << d2 << std::endl;
-					return false;
-				}
-			}
-			return d1 < d2;
-		};
-		std::set<Decl *, decltype(pred)> unique_members( assertions.begin(), assertions.end(), pred );
-		// if ( unique_members.size() != assertions.size() ) {
-		// 	std::cerr << "============different" << std::endl;
-		// 	std::cerr << unique_members.size() << " " << assertions.size() << std::endl;
-		// }
-
-		std::list< Decl * > order;
-		order.splice( order.end(), assertions );
-		std::copy_if( order.begin(), order.end(), back_inserter( assertions ), [&]( Decl * decl ) {
-			return unique_members.count( decl );
-		});
-	}
-
 	// expand assertions from trait instance, performing the appropriate type variable substitutions
 	template< typename Iterator >
@@ -838,135 +623,4 @@
 		// substitute trait decl parameters for instance parameters
 		applySubstitution( inst->baseTrait->parameters.begin(), inst->baseTrait->parameters.end(), inst->parameters.begin(), asserts.begin(), asserts.end(), out );
-	}
-
-	void LinkReferenceToTypes_old::postvisit( TraitDecl * traitDecl ) {
-		if ( traitDecl->name == "sized" ) {
-			// "sized" is a special trait - flick the sized status on for the type variable
-			assertf( traitDecl->parameters.size() == 1, "Built-in trait 'sized' has incorrect number of parameters: %zd", traitDecl->parameters.size() );
-			TypeDecl * td = traitDecl->parameters.front();
-			td->set_sized( true );
-		}
-
-		// move assertions from type parameters into the body of the trait
-		for ( TypeDecl * td : traitDecl->parameters ) {
-			for ( DeclarationWithType * assert : td->assertions ) {
-				if ( TraitInstType * inst = dynamic_cast< TraitInstType * >( assert->get_type() ) ) {
-					expandAssertions( inst, back_inserter( traitDecl->members ) );
-				} else {
-					traitDecl->members.push_back( assert->clone() );
-				}
-			}
-			deleteAll( td->assertions );
-			td->assertions.clear();
-		} // for
-	}
-
-	void LinkReferenceToTypes_old::postvisit( TraitInstType * traitInst ) {
-		// handle other traits
-		const TraitDecl * traitDecl = local_indexer->lookupTrait( traitInst->name );
-		if ( ! traitDecl ) {
-			SemanticError( traitInst->location, "use of undeclared trait " + traitInst->name );
-		} // if
-		if ( traitDecl->parameters.size() != traitInst->parameters.size() ) {
-			SemanticError( traitInst, "incorrect number of trait parameters: " );
-		} // if
-		traitInst->baseTrait = const_cast<TraitDecl *>(traitDecl); // Just linking in the node
-
-		// need to carry over the 'sized' status of each decl in the instance
-		for ( auto p : group_iterate( traitDecl->parameters, traitInst->parameters ) ) {
-			TypeExpr * expr = dynamic_cast< TypeExpr * >( std::get<1>(p) );
-			if ( ! expr ) {
-				SemanticError( std::get<1>(p), "Expression parameters for trait instances are currently unsupported: " );
-			}
-			if ( TypeInstType * inst = dynamic_cast< TypeInstType * >( expr->get_type() ) ) {
-				TypeDecl * formalDecl = std::get<0>(p);
-				TypeDecl * instDecl = inst->baseType;
-				if ( formalDecl->get_sized() ) instDecl->set_sized( true );
-			}
-		}
-		// normalizeAssertions( traitInst->members );
-	}
-
-	void LinkReferenceToTypes_old::postvisit( EnumDecl * enumDecl ) {
-		// visit enum members first so that the types of self-referencing members are updated properly
-		// Replace the enum base; right now it works only for StructEnum
-		if ( enumDecl->base && dynamic_cast<TypeInstType*>(enumDecl->base) ) {
-			std::string baseName = static_cast<TypeInstType*>(enumDecl->base)->name;
-			const StructDecl * st = local_indexer->lookupStruct( baseName );
-			if ( st ) {
-				enumDecl->base = new StructInstType(Type::Qualifiers(),const_cast<StructDecl *>(st)); // Just linking in the node
-			}
-		}
-		if ( enumDecl->body ) {
-			ForwardEnumsType::iterator fwds = forwardEnums.find( enumDecl->name );
-			if ( fwds != forwardEnums.end() ) {
-				for ( std::list< EnumInstType * >::iterator inst = fwds->second.begin(); inst != fwds->second.end(); ++inst ) {
-					(* inst)->baseEnum = enumDecl;
-				} // for
-				forwardEnums.erase( fwds );
-			} // if
-		} // if
-	}
-
-	void LinkReferenceToTypes_old::renameGenericParams( std::list< TypeDecl * > & params ) {
-		// rename generic type parameters uniquely so that they do not conflict with user-defined function forall parameters, e.g.
-		//   forall(otype T)
-		//   struct Box {
-		//     T x;
-		//   };
-		//   forall(otype T)
-		//   void f(Box(T) b) {
-		//     ...
-		//   }
-		// The T in Box and the T in f are different, so internally the naming must reflect that.
-		GuardValue( inGeneric );
-		inGeneric = ! params.empty();
-		for ( TypeDecl * td : params ) {
-			td->name = "__" + td->name + "_generic_";
-		}
-	}
-
-	void LinkReferenceToTypes_old::previsit( StructDecl * structDecl ) {
-		renameGenericParams( structDecl->parameters );
-	}
-
-	void LinkReferenceToTypes_old::previsit( UnionDecl * unionDecl ) {
-		renameGenericParams( unionDecl->parameters );
-	}
-
-	void LinkReferenceToTypes_old::postvisit( StructDecl * structDecl ) {
-		// visit struct members first so that the types of self-referencing members are updated properly
-		// xxx - need to ensure that type parameters match up between forward declarations and definition (most importantly, number of type parameters and their defaults)
-		if ( structDecl->body ) {
-			ForwardStructsType::iterator fwds = forwardStructs.find( structDecl->name );
-			if ( fwds != forwardStructs.end() ) {
-				for ( std::list< StructInstType * >::iterator inst = fwds->second.begin(); inst != fwds->second.end(); ++inst ) {
-					(* inst)->baseStruct = structDecl;
-				} // for
-				forwardStructs.erase( fwds );
-			} // if
-		} // if
-	}
-
-	void LinkReferenceToTypes_old::postvisit( UnionDecl * unionDecl ) {
-		if ( unionDecl->body ) {
-			ForwardUnionsType::iterator fwds = forwardUnions.find( unionDecl->name );
-			if ( fwds != forwardUnions.end() ) {
-				for ( std::list< UnionInstType * >::iterator inst = fwds->second.begin(); inst != fwds->second.end(); ++inst ) {
-					(* inst)->baseUnion = unionDecl;
-				} // for
-				forwardUnions.erase( fwds );
-			} // if
-		} // if
-	}
-
-	void LinkReferenceToTypes_old::postvisit( TypeInstType * typeInst ) {
-		// ensure generic parameter instances are renamed like the base type
-		if ( inGeneric && typeInst->baseType ) typeInst->name = typeInst->baseType->name;
-		if ( const NamedTypeDecl * namedTypeDecl = local_indexer->lookupType( typeInst->name ) ) {
-			if ( const TypeDecl * typeDecl = dynamic_cast< const TypeDecl * >( namedTypeDecl ) ) {
-				typeInst->set_isFtype( typeDecl->kind == TypeDecl::Ftype );
-			} // if
-		} // if
 	}
 
@@ -997,5 +651,4 @@
 						}
 					}
-					
 				}
 			}
@@ -1085,39 +738,4 @@
 	void ForallPointerDecay_old::previsit( UnionDecl * aggrDecl ) {
 		forallFixer( aggrDecl->parameters, aggrDecl );
-	}
-
-	void TraitExpander_old::previsit( FunctionType * ftype ) {
-		expandTraits( ftype->forall );
-	}
-
-	void TraitExpander_old::previsit( StructDecl * aggrDecl ) {
-		expandTraits( aggrDecl->parameters );
-	}
-
-	void TraitExpander_old::previsit( UnionDecl * aggrDecl ) {
-		expandTraits( aggrDecl->parameters );
-	}
-
-	void AssertionFixer_old::previsit( FunctionType * ftype ) {
-		fixAssertions( ftype->forall, ftype );
-	}
-
-	void AssertionFixer_old::previsit( StructDecl * aggrDecl ) {
-		fixAssertions( aggrDecl->parameters, aggrDecl );
-	}
-
-	void AssertionFixer_old::previsit( UnionDecl * aggrDecl ) {
-		fixAssertions( aggrDecl->parameters, aggrDecl );
-	}
-
-	void CheckOperatorTypes_old::previsit( ObjectDecl * object ) {
-		// ensure that operator names only apply to functions or function pointers
-		if ( CodeGen::isOperator( object->name ) && ! dynamic_cast< FunctionType * >( object->type->stripDeclarator() ) ) {
-			SemanticError( object->location, toCString( "operator ", object->name.c_str(), " is not a function or function pointer." )  );
-		}
-	}
-
-	void FixUniqueIds_old::previsit( DeclarationWithType * decl ) {
-		decl->fixUniqueId();
 	}
 
Index: src/SymTab/Validate.h
===================================================================
--- src/SymTab/Validate.h	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/SymTab/Validate.h	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,7 +10,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Sun May 17 21:53:34 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:46:07 2017
-// Update Count     : 4
+// Last Modified By : Andrew Beach
+// Last Modified On : Tue May 17 14:35:00 2022
+// Update Count     : 5
 //
 
@@ -33,5 +33,4 @@
 	/// Normalizes struct and function declarations
 	void validate( std::list< Declaration * > &translationUnit, bool doDebug = false );
-	void validateType( Type *type, const Indexer *indexer );
 
 	// Sub-passes of validate.
@@ -42,8 +41,4 @@
 	void validate_E( std::list< Declaration * > &translationUnit );
 	void validate_F( std::list< Declaration * > &translationUnit );
-	void linkReferenceToTypes( std::list< Declaration * > &translationUnit );
-
-	const ast::Type * validateType(
-		const CodeLocation & loc, const ast::Type * type, const ast::SymbolTable & symtab );
 } // namespace SymTab
 
Index: src/SymTab/ValidateType.cc
===================================================================
--- src/SymTab/ValidateType.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
+++ src/SymTab/ValidateType.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -0,0 +1,476 @@
+//
+// 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.
+//
+// ValidateType.cc -- Validate and normalize types.
+//
+// Author           : Andrew Beach
+// Created On       : Mon May 16 16:21:00 2022
+// Last Modified By : Andrew Beach
+// Last Modified On : Tue May 17 14:06:00 2022
+// Update Count     : 0
+//
+
+#include "ValidateType.h"
+
+#include "CodeGen/OperatorTable.h"
+#include "Common/PassVisitor.h"
+#include "SymTab/FixFunction.h"
+#include "SynTree/Declaration.h"
+#include "SynTree/Type.h"
+
+namespace SymTab {
+
+namespace {
+
+/// Replaces enum types by int, and function or array types in function
+/// parameter and return lists by appropriate pointers.
+struct EnumAndPointerDecay_old {
+	void previsit( EnumDecl * aggregateDecl );
+	void previsit( FunctionType * func );
+};
+
+void EnumAndPointerDecay_old::previsit( EnumDecl * enumDecl ) {
+	// Set the type of each member of the enumeration to be EnumConstant
+	for ( std::list< Declaration * >::iterator i = enumDecl->members.begin(); i != enumDecl->members.end(); ++i ) {
+		ObjectDecl * obj = dynamic_cast< ObjectDecl * >( * i );
+		assert( obj );
+		obj->set_type( new EnumInstType( Type::Qualifiers( Type::Const ), enumDecl->name ) );
+	} // for
+}
+
+template< typename DWTList >
+void fixFunctionList( DWTList & dwts, bool isVarArgs, FunctionType * func ) {
+	auto nvals = dwts.size();
+	bool containsVoid = false;
+	for ( auto & dwt : dwts ) {
+		// fix each DWT and record whether a void was found
+		containsVoid |= fixFunction( dwt );
+	}
+
+	// the only case in which "void" is valid is where it is the only one in the list
+	if ( containsVoid && ( nvals > 1 || isVarArgs ) ) {
+		SemanticError( func, "invalid type void in function type " );
+	}
+
+	// one void is the only thing in the list; remove it.
+	if ( containsVoid ) {
+		delete dwts.front();
+		dwts.clear();
+	}
+}
+
+void EnumAndPointerDecay_old::previsit( FunctionType * func ) {
+	// Fix up parameters and return types
+	fixFunctionList( func->parameters, func->isVarArgs, func );
+	fixFunctionList( func->returnVals, false, func );
+}
+
+/// Associates forward declarations of aggregates with their definitions
+struct LinkReferenceToTypes_old final : public WithIndexer, public WithGuards, public WithVisitorRef<LinkReferenceToTypes_old>, public WithShortCircuiting {
+	LinkReferenceToTypes_old( const Indexer * indexer );
+
+	void postvisit( TypeInstType * typeInst );
+
+	void postvisit( EnumInstType * enumInst );
+	void postvisit( StructInstType * structInst );
+	void postvisit( UnionInstType * unionInst );
+	void postvisit( TraitInstType * traitInst );
+	void previsit( QualifiedType * qualType );
+	void postvisit( QualifiedType * qualType );
+
+	void postvisit( EnumDecl * enumDecl );
+	void postvisit( StructDecl * structDecl );
+	void postvisit( UnionDecl * unionDecl );
+	void postvisit( TraitDecl * traitDecl );
+
+	void previsit( StructDecl * structDecl );
+	void previsit( UnionDecl * unionDecl );
+
+	void renameGenericParams( std::list< TypeDecl * > & params );
+
+private:
+	const Indexer * local_indexer;
+
+	typedef std::map< std::string, std::list< EnumInstType * > > ForwardEnumsType;
+	typedef std::map< std::string, std::list< StructInstType * > > ForwardStructsType;
+	typedef std::map< std::string, std::list< UnionInstType * > > ForwardUnionsType;
+	ForwardEnumsType forwardEnums;
+	ForwardStructsType forwardStructs;
+	ForwardUnionsType forwardUnions;
+	/// true if currently in a generic type body, so that type parameter instances can be renamed appropriately
+	bool inGeneric = false;
+};
+
+
+LinkReferenceToTypes_old::LinkReferenceToTypes_old( const Indexer * other_indexer ) : WithIndexer( false ) {
+	if ( other_indexer ) {
+		local_indexer = other_indexer;
+	} else {
+		local_indexer = &indexer;
+	} // if
+}
+
+void LinkReferenceToTypes_old::postvisit( EnumInstType * enumInst ) {
+	const EnumDecl * st = local_indexer->lookupEnum( enumInst->name );
+	// it's not a semantic error if the enum is not found, just an implicit forward declaration
+	if ( st ) {
+		enumInst->baseEnum = const_cast<EnumDecl *>(st); // Just linking in the node
+	} // if
+	if ( ! st || ! st->body ) {
+		// use of forward declaration
+		forwardEnums[ enumInst->name ].push_back( enumInst );
+	} // if
+}
+
+void LinkReferenceToTypes_old::postvisit( StructInstType * structInst ) {
+	const StructDecl * st = local_indexer->lookupStruct( structInst->name );
+	// it's not a semantic error if the struct is not found, just an implicit forward declaration
+	if ( st ) {
+		structInst->baseStruct = const_cast<StructDecl *>(st); // Just linking in the node
+	} // if
+	if ( ! st || ! st->body ) {
+		// use of forward declaration
+		forwardStructs[ structInst->name ].push_back( structInst );
+	} // if
+}
+
+void LinkReferenceToTypes_old::postvisit( UnionInstType * unionInst ) {
+	const UnionDecl * un = local_indexer->lookupUnion( unionInst->name );
+	// it's not a semantic error if the union is not found, just an implicit forward declaration
+	if ( un ) {
+		unionInst->baseUnion = const_cast<UnionDecl *>(un); // Just linking in the node
+	} // if
+	if ( ! un || ! un->body ) {
+		// use of forward declaration
+		forwardUnions[ unionInst->name ].push_back( unionInst );
+	} // if
+}
+
+void LinkReferenceToTypes_old::previsit( QualifiedType * ) {
+	visit_children = false;
+}
+
+void LinkReferenceToTypes_old::postvisit( QualifiedType * qualType ) {
+	// linking only makes sense for the 'oldest ancestor' of the qualified type
+	qualType->parent->accept( * visitor );
+}
+
+// expand assertions from trait instance, performing the appropriate type variable substitutions
+template< typename Iterator >
+void expandAssertions( TraitInstType * inst, Iterator out ) {
+	assertf( inst->baseTrait, "Trait instance not linked to base trait: %s", toCString( inst ) );
+	std::list< DeclarationWithType * > asserts;
+	for ( Declaration * decl : inst->baseTrait->members ) {
+		asserts.push_back( strict_dynamic_cast<DeclarationWithType *>( decl->clone() ) );
+	}
+	// substitute trait decl parameters for instance parameters
+	applySubstitution( inst->baseTrait->parameters.begin(), inst->baseTrait->parameters.end(), inst->parameters.begin(), asserts.begin(), asserts.end(), out );
+}
+
+void LinkReferenceToTypes_old::postvisit( TraitDecl * traitDecl ) {
+	if ( traitDecl->name == "sized" ) {
+		// "sized" is a special trait - flick the sized status on for the type variable
+		assertf( traitDecl->parameters.size() == 1, "Built-in trait 'sized' has incorrect number of parameters: %zd", traitDecl->parameters.size() );
+		TypeDecl * td = traitDecl->parameters.front();
+		td->set_sized( true );
+	}
+
+	// move assertions from type parameters into the body of the trait
+	for ( TypeDecl * td : traitDecl->parameters ) {
+		for ( DeclarationWithType * assert : td->assertions ) {
+			if ( TraitInstType * inst = dynamic_cast< TraitInstType * >( assert->get_type() ) ) {
+				expandAssertions( inst, back_inserter( traitDecl->members ) );
+			} else {
+				traitDecl->members.push_back( assert->clone() );
+			}
+		}
+		deleteAll( td->assertions );
+		td->assertions.clear();
+	} // for
+}
+
+void LinkReferenceToTypes_old::postvisit( TraitInstType * traitInst ) {
+	// handle other traits
+	const TraitDecl * traitDecl = local_indexer->lookupTrait( traitInst->name );
+	if ( ! traitDecl ) {
+		SemanticError( traitInst->location, "use of undeclared trait " + traitInst->name );
+	} // if
+	if ( traitDecl->parameters.size() != traitInst->parameters.size() ) {
+		SemanticError( traitInst, "incorrect number of trait parameters: " );
+	} // if
+	traitInst->baseTrait = const_cast<TraitDecl *>(traitDecl); // Just linking in the node
+
+	// need to carry over the 'sized' status of each decl in the instance
+	for ( auto p : group_iterate( traitDecl->parameters, traitInst->parameters ) ) {
+		TypeExpr * expr = dynamic_cast< TypeExpr * >( std::get<1>(p) );
+		if ( ! expr ) {
+			SemanticError( std::get<1>(p), "Expression parameters for trait instances are currently unsupported: " );
+		}
+		if ( TypeInstType * inst = dynamic_cast< TypeInstType * >( expr->get_type() ) ) {
+			TypeDecl * formalDecl = std::get<0>(p);
+			TypeDecl * instDecl = inst->baseType;
+			if ( formalDecl->get_sized() ) instDecl->set_sized( true );
+		}
+	}
+	// normalizeAssertions( traitInst->members );
+}
+
+void LinkReferenceToTypes_old::postvisit( EnumDecl * enumDecl ) {
+	// visit enum members first so that the types of self-referencing members are updated properly
+	// Replace the enum base; right now it works only for StructEnum
+	if ( enumDecl->base && dynamic_cast<TypeInstType*>(enumDecl->base) ) {
+		std::string baseName = static_cast<TypeInstType*>(enumDecl->base)->name;
+		const StructDecl * st = local_indexer->lookupStruct( baseName );
+		if ( st ) {
+			enumDecl->base = new StructInstType(Type::Qualifiers(),const_cast<StructDecl *>(st)); // Just linking in the node
+		}
+	}
+	if ( enumDecl->body ) {
+		ForwardEnumsType::iterator fwds = forwardEnums.find( enumDecl->name );
+		if ( fwds != forwardEnums.end() ) {
+			for ( std::list< EnumInstType * >::iterator inst = fwds->second.begin(); inst != fwds->second.end(); ++inst ) {
+				(* inst)->baseEnum = enumDecl;
+			} // for
+			forwardEnums.erase( fwds );
+		} // if
+	} // if
+}
+
+void LinkReferenceToTypes_old::renameGenericParams( std::list< TypeDecl * > & params ) {
+	// rename generic type parameters uniquely so that they do not conflict with user-defined function forall parameters, e.g.
+	//   forall(otype T)
+	//   struct Box {
+	//     T x;
+	//   };
+	//   forall(otype T)
+	//   void f(Box(T) b) {
+	//     ...
+	//   }
+	// The T in Box and the T in f are different, so internally the naming must reflect that.
+	GuardValue( inGeneric );
+	inGeneric = ! params.empty();
+	for ( TypeDecl * td : params ) {
+		td->name = "__" + td->name + "_generic_";
+	}
+}
+
+void LinkReferenceToTypes_old::previsit( StructDecl * structDecl ) {
+	renameGenericParams( structDecl->parameters );
+}
+
+void LinkReferenceToTypes_old::previsit( UnionDecl * unionDecl ) {
+	renameGenericParams( unionDecl->parameters );
+}
+
+void LinkReferenceToTypes_old::postvisit( StructDecl * structDecl ) {
+	// visit struct members first so that the types of self-referencing members are updated properly
+	// xxx - need to ensure that type parameters match up between forward declarations and definition (most importantly, number of type parameters and their def>
+	if ( structDecl->body ) {
+		ForwardStructsType::iterator fwds = forwardStructs.find( structDecl->name );
+		if ( fwds != forwardStructs.end() ) {
+			for ( std::list< StructInstType * >::iterator inst = fwds->second.begin(); inst != fwds->second.end(); ++inst ) {
+				(* inst)->baseStruct = structDecl;
+			} // for
+			forwardStructs.erase( fwds );
+		} // if
+	} // if
+}
+
+void LinkReferenceToTypes_old::postvisit( UnionDecl * unionDecl ) {
+	if ( unionDecl->body ) {
+	ForwardUnionsType::iterator fwds = forwardUnions.find( unionDecl->name );
+		if ( fwds != forwardUnions.end() ) {
+			for ( std::list< UnionInstType * >::iterator inst = fwds->second.begin(); inst != fwds->second.end(); ++inst ) {
+				(* inst)->baseUnion = unionDecl;
+			} // for
+			forwardUnions.erase( fwds );
+		} // if
+	} // if
+}
+
+void LinkReferenceToTypes_old::postvisit( TypeInstType * typeInst ) {
+	// ensure generic parameter instances are renamed like the base type
+	if ( inGeneric && typeInst->baseType ) typeInst->name = typeInst->baseType->name;
+	if ( const NamedTypeDecl * namedTypeDecl = local_indexer->lookupType( typeInst->name ) ) {
+		if ( const TypeDecl * typeDecl = dynamic_cast< const TypeDecl * >( namedTypeDecl ) ) {
+			typeInst->set_isFtype( typeDecl->kind == TypeDecl::Ftype );
+		} // if
+	} // if
+}
+
+/* // expand assertions from trait instance, performing the appropriate type variable substitutions
+template< typename Iterator >
+void expandAssertions( TraitInstType * inst, Iterator out ) {
+	assertf( inst->baseTrait, "Trait instance not linked to base trait: %s", toCString( inst ) );
+	std::list< DeclarationWithType * > asserts;
+	for ( Declaration * decl : inst->baseTrait->members ) {
+		asserts.push_back( strict_dynamic_cast<DeclarationWithType *>( decl->clone() ) );
+	}
+	// substitute trait decl parameters for instance parameters
+	applySubstitution( inst->baseTrait->parameters.begin(), inst->baseTrait->parameters.end(), inst->parameters.begin(), asserts.begin(), asserts.end(), out );
+}*/
+
+/// Replace all traits in assertion lists with their assertions.
+void expandTraits( std::list< TypeDecl * > & forall ) {
+	for ( TypeDecl * type : forall ) {
+		std::list< DeclarationWithType * > asserts;
+		asserts.splice( asserts.end(), type->assertions );
+		// expand trait instances into their members
+		for ( DeclarationWithType * assertion : asserts ) {
+			if ( TraitInstType * traitInst = dynamic_cast< TraitInstType * >( assertion->get_type() ) ) {
+				// expand trait instance into all of its members
+				expandAssertions( traitInst, back_inserter( type->assertions ) );
+				delete traitInst;
+			} else {
+				// pass other assertions through
+				type->assertions.push_back( assertion );
+			} // if
+		} // for
+	} // for
+}
+
+struct TraitExpander_old final {
+	void previsit( FunctionType * type ) {
+		expandTraits( type->forall );
+	}
+	void previsit( StructDecl * decl ) {
+		expandTraits( decl->parameters );
+	}
+	void previsit( UnionDecl * decl ) {
+		expandTraits( decl->parameters );
+	}
+};
+
+/*struct TraitExpander_old final {
+	void previsit( FunctionType * );
+	void previsit( StructDecl * );
+	void previsit( UnionDecl * );
+};
+
+void TraitExpander_old::previsit( FunctionType * ftype ) {
+	expandTraits( ftype->forall );
+}
+
+void TraitExpander_old::previsit( StructDecl * aggrDecl ) {
+	expandTraits( aggrDecl->parameters );
+}
+
+void TraitExpander_old::previsit( UnionDecl * aggrDecl ) {
+	expandTraits( aggrDecl->parameters );
+}*/
+
+/// Fix each function in the assertion list and check for invalid void type.
+void fixAssertions(
+		std::list< TypeDecl * > & forall, BaseSyntaxNode * node ) {
+	for ( TypeDecl * type : forall ) {
+		for ( DeclarationWithType *& assertion : type->assertions ) {
+			bool isVoid = fixFunction( assertion );
+			if ( isVoid ) {
+				SemanticError( node, "invalid type void in assertion of function " );
+			} // if
+		} // for
+	}
+}
+
+struct AssertionFixer_old final {
+	void previsit( FunctionType * type ) {
+		fixAssertions( type->forall, type );
+	}
+	void previsit( StructDecl * decl ) {
+		fixAssertions( decl->parameters, decl );
+	}
+	void previsit( UnionDecl * decl ) {
+		fixAssertions( decl->parameters, decl );
+	}
+};
+
+/*
+struct AssertionFixer_old final {
+	void previsit( FunctionType * );
+	void previsit( StructDecl * );
+	void previsit( UnionDecl * );
+};
+
+void AssertionFixer_old::previsit( FunctionType * ftype ) {
+	fixAssertions( ftype->forall, ftype );
+}
+
+void AssertionFixer_old::previsit( StructDecl * aggrDecl ) {
+	fixAssertions( aggrDecl->parameters, aggrDecl );
+}
+
+void AssertionFixer_old::previsit( UnionDecl * aggrDecl ) {
+	fixAssertions( aggrDecl->parameters, aggrDecl );
+}*/
+
+struct CheckOperatorTypes_old final {
+	void previsit( ObjectDecl * );
+};
+
+void CheckOperatorTypes_old::previsit( ObjectDecl * object ) {
+	// ensure that operator names only apply to functions or function pointers
+	if ( CodeGen::isOperator( object->name ) && ! dynamic_cast< FunctionType * >( object->type->stripDeclarator() ) ) {
+		SemanticError( object->location, toCString( "operator ", object->name.c_str(), " is not a function or function pointer." )  );
+	}
+}
+
+struct FixUniqueIds_old final {
+	void previsit( DeclarationWithType * decl ) {
+		decl->fixUniqueId();
+	}
+};
+
+//void FixUniqueIds_old::previsit( DeclarationWithType * decl ) {
+//	decl->fixUniqueId();
+//}
+
+
+} // namespace
+
+void validateType( Type *type, const Indexer *indexer ) {
+	PassVisitor<EnumAndPointerDecay_old> epc;
+	PassVisitor<LinkReferenceToTypes_old> lrt( indexer );
+	PassVisitor<TraitExpander_old> te;
+	PassVisitor<AssertionFixer_old> af;
+	PassVisitor<CheckOperatorTypes_old> cot;
+	PassVisitor<FixUniqueIds_old> fui;
+	type->accept( epc );
+	type->accept( lrt );
+	type->accept( te );
+	type->accept( af );
+	type->accept( cot );
+	type->accept( fui );
+}
+
+void decayEnumsAndPointers( std::list< Declaration * > & translationUnit ) {
+	PassVisitor<EnumAndPointerDecay_old> epc;
+	acceptAll( translationUnit, epc );
+}
+
+void linkReferenceToTypes( std::list< Declaration * > & translationUnit ) {
+	PassVisitor<LinkReferenceToTypes_old> lrt( nullptr );
+	acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions
+}
+
+void decayForallPointers( std::list< Declaration * > & translationUnit ) {
+	PassVisitor<TraitExpander_old> te;
+	acceptAll( translationUnit, te );
+	PassVisitor<AssertionFixer_old> af;
+	acceptAll( translationUnit, af );
+	PassVisitor<CheckOperatorTypes_old> cot;
+	acceptAll( translationUnit, cot );
+	PassVisitor<FixUniqueIds_old> fui;
+	acceptAll( translationUnit, fui );
+}
+
+
+} // namespace SymTab
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/SymTab/ValidateType.h
===================================================================
--- src/SymTab/ValidateType.h	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
+++ src/SymTab/ValidateType.h	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -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.
+//
+// ValidateType.h -- Validate and normalize types.
+//
+// Author           : Andrew Beach
+// Created On       : Mon May 16 16:18:00 2022
+// Last Modified By : Andrew Beach
+// Last Modified On : Mon May 16 16:18:00 2022
+// Update Count     : 0
+//
+
+#pragma once
+
+#include <list>
+
+class Declaration;
+class Type;
+
+namespace SymTab {
+	class Indexer;
+
+	void validateType( Type *type, const Indexer *indexer );
+
+	// Sub-passes that are also used by the larger validate pass.
+	void decayEnumsAndPointers( std::list< Declaration * > & translationUnit );
+	void linkReferenceToTypes( std::list< Declaration * > & translationUnit );
+	void decayForallPointers( std::list< Declaration * > & translationUnit );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/SymTab/module.mk
===================================================================
--- src/SymTab/module.mk	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/SymTab/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -11,22 +11,25 @@
 ## Created On       : Mon Jun  1 17:49:17 2015
 ## Last Modified By : Andrew Beach
-## Last Modified On : Thr Aug 10 16:08:00 2017
-## Update Count     : 4
+## Last Modified On : Tue May 17 14:46:00 2022
+## Update Count     : 5
 ###############################################################################
 
 SRC_SYMTAB = \
-      SymTab/Autogen.cc \
-      SymTab/Autogen.h \
-      SymTab/FixFunction.cc \
-      SymTab/FixFunction.h \
-      SymTab/Indexer.cc \
-      SymTab/Indexer.h \
-      SymTab/Mangler.cc \
-      SymTab/ManglerCommon.cc \
-      SymTab/Mangler.h \
-      SymTab/Validate.cc \
-      SymTab/Validate.h
+	SymTab/Autogen.cc \
+	SymTab/Autogen.h \
+	SymTab/FixFunction.cc \
+	SymTab/FixFunction.h \
+	SymTab/Indexer.cc \
+	SymTab/Indexer.h \
+	SymTab/Mangler.cc \
+	SymTab/ManglerCommon.cc \
+	SymTab/Mangler.h \
+	SymTab/ValidateType.cc \
+	SymTab/ValidateType.h
 
-SRC += $(SRC_SYMTAB)
+SRC += $(SRC_SYMTAB) \
+	SymTab/Validate.cc \
+	SymTab/Validate.h
+
 SRCDEMANGLE += $(SRC_SYMTAB) \
 	SymTab/Demangle.cc \
Index: src/SynTree/BaseSyntaxNode.cc
===================================================================
--- src/SynTree/BaseSyntaxNode.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
+++ src/SynTree/BaseSyntaxNode.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -0,0 +1,31 @@
+//
+// 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.
+//
+// BaseSyntaxNode.cc --
+//
+// Author           : Andrew Beach
+// Created On       : Fri May 13 13:58:00 2022
+// Last Modified By : Andrew Beach
+// Last Modified On : Fri May 13 14:01:00 2022
+// Update Count     : 0
+//
+
+#include "BaseSyntaxNode.h"
+
+std::ostream & operator<<( std::ostream & out, const BaseSyntaxNode * node ) {
+    if ( node ) {
+        node->print( out );
+    } else {
+        out << "nullptr";
+    }
+    return out;
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/SynTree/module.mk
===================================================================
--- src/SynTree/module.mk	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/SynTree/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -24,4 +24,5 @@
       SynTree/AttrType.cc \
       SynTree/BaseSyntaxNode.h \
+      SynTree/BaseSyntaxNode.cc \
       SynTree/BasicType.cc \
       SynTree/CommaExpr.cc \
Index: src/Tuples/TupleExpansion.cc
===================================================================
--- src/Tuples/TupleExpansion.cc	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/Tuples/TupleExpansion.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -9,7 +9,7 @@
 // Author           : Rodolfo G. Esteves
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Dec 13 23:45:51 2019
-// Update Count     : 24
+// Last Modified By : Andrew Beach
+// Last Modified On : Tue May 17 15:02:00 2022
+// Update Count     : 25
 //
 
@@ -367,50 +367,4 @@
 		return nullptr;
 	}
-
-	namespace {
-		/// determines if impurity (read: side-effects) may exist in a piece of code. Currently gives a very crude approximation, wherein any function call expression means the code may be impure
-		struct ImpurityDetector : public WithShortCircuiting {
-			ImpurityDetector( bool ignoreUnique ) : ignoreUnique( ignoreUnique ) {}
-
-			void previsit( const ApplicationExpr * appExpr ) {
-				visit_children = false;
-				if ( const DeclarationWithType * function = InitTweak::getFunction( appExpr ) ) {
-					if ( function->linkage == LinkageSpec::Intrinsic ) {
-						if ( function->name == "*?" || function->name == "?[?]" ) {
-							// intrinsic dereference, subscript are pure, but need to recursively look for impurity
-							visit_children = true;
-							return;
-						}
-					}
-				}
-				maybeImpure = true;
-			}
-			void previsit( const UntypedExpr * ) { maybeImpure = true; visit_children = false; }
-			void previsit( const UniqueExpr * ) {
-				if ( ignoreUnique ) {
-					// bottom out at unique expression.
-					// The existence of a unique expression doesn't change the purity of an expression.
-					// That is, even if the wrapped expression is impure, the wrapper protects the rest of the expression.
-					visit_children = false;
-					return;
-				}
-			}
-
-			bool maybeImpure = false;
-			bool ignoreUnique;
-		};
-	} // namespace
-
-	bool maybeImpure( const Expression * expr ) {
-		PassVisitor<ImpurityDetector> detector( false );
-		expr->accept( detector );
-		return detector.pass.maybeImpure;
-	}
-
-	bool maybeImpureIgnoreUnique( const Expression * expr ) {
-		PassVisitor<ImpurityDetector> detector( true );
-		expr->accept( detector );
-		return detector.pass.maybeImpure;
-	}
 } // namespace Tuples
 
Index: src/Tuples/Tuples.cc
===================================================================
--- src/Tuples/Tuples.cc	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/Tuples/Tuples.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,6 +10,6 @@
 // Created On       : Mon Jun 17 14:41:00 2019
 // Last Modified By : Andrew Beach
-// Last Modified On : Tue Jun 18  9:31:00 2019
-// Update Count     : 1
+// Last Modified On : Mon May 16 16:15:00 2022
+// Update Count     : 2
 //
 
@@ -18,4 +18,5 @@
 #include "AST/Pass.hpp"
 #include "AST/LinkageSpec.hpp"
+#include "Common/PassVisitor.h"
 #include "InitTweak/InitTweak.h"
 
@@ -23,9 +24,58 @@
 
 namespace {
+	/// Checks if impurity (read: side-effects) may exist in a piece of code.
+	/// Currently gives a very crude approximation, wherein any function
+	/// call expression means the code may be impure.
+	struct ImpurityDetector_old : public WithShortCircuiting {
+		bool const ignoreUnique;
+		bool maybeImpure;
+
+		ImpurityDetector_old( bool ignoreUnique ) :
+			ignoreUnique( ignoreUnique ), maybeImpure( false )
+		{}
+
+		void previsit( const ApplicationExpr * appExpr ) {
+			visit_children = false;
+			if ( const DeclarationWithType * function =
+					InitTweak::getFunction( appExpr ) ) {
+				if ( function->linkage == LinkageSpec::Intrinsic ) {
+					if ( function->name == "*?" || function->name == "?[?]" ) {
+						// intrinsic dereference, subscript are pure,
+						// but need to recursively look for impurity
+						visit_children = true;
+						return;
+					}
+				}
+			}
+			maybeImpure = true;
+		}
+
+		void previsit( const UntypedExpr * ) {
+			maybeImpure = true;
+			visit_children = false;
+		}
+
+		void previsit( const UniqueExpr * ) {
+			if ( ignoreUnique ) {
+				// bottom out at unique expression.
+				// The existence of a unique expression doesn't change the purity of an expression.
+				// That is, even if the wrapped expression is impure, the wrapper protects the rest of the expression.
+				visit_children = false;
+				return;
+			}
+		}
+	};
+
+	bool detectImpurity( const Expression * expr, bool ignoreUnique ) {
+		PassVisitor<ImpurityDetector_old> detector( ignoreUnique );
+		expr->accept( detector );
+		return detector.pass.maybeImpure;
+	}
+
 	/// Determines if impurity (read: side-effects) may exist in a piece of code. Currently gives
 	/// a very crude approximation, wherein any function call expression means the code may be
 	/// impure.
     struct ImpurityDetector : public ast::WithShortCircuiting {
-		bool maybeImpure = false;
+		bool result = false;
 
 		void previsit( ast::ApplicationExpr const * appExpr ) {
@@ -36,10 +86,11 @@
 				}
 			}
-			maybeImpure = true; visit_children = false;
+			result = true; visit_children = false;
 		}
 		void previsit( ast::UntypedExpr const * ) {
-			maybeImpure = true; visit_children = false;
+			result = true; visit_children = false;
 		}
 	};
+
 	struct ImpurityDetectorIgnoreUnique : public ImpurityDetector {
 		using ImpurityDetector::previsit;
@@ -48,19 +99,20 @@
 		}
 	};
-
-	template<typename Detector>
-	bool detectImpurity( const ast::Expr * expr ) {
-		ast::Pass<Detector> detector;
-		expr->accept( detector );
-		return detector.core.maybeImpure;
-	}
 } // namespace
 
 bool maybeImpure( const ast::Expr * expr ) {
-	return detectImpurity<ImpurityDetector>( expr );
+	return ast::Pass<ImpurityDetector>::read( expr );
 }
 
 bool maybeImpureIgnoreUnique( const ast::Expr * expr ) {
-	return detectImpurity<ImpurityDetectorIgnoreUnique>( expr );
+	return ast::Pass<ImpurityDetectorIgnoreUnique>::read( expr );
+}
+
+bool maybeImpure( const Expression * expr ) {
+	return detectImpurity( expr, false );
+}
+
+bool maybeImpureIgnoreUnique( const Expression * expr ) {
+	return detectImpurity( expr, true );
 }
 
Index: src/Tuples/module.mk
===================================================================
--- src/Tuples/module.mk	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/Tuples/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,7 +10,7 @@
 ## Author           : Richard C. Bilson
 ## Created On       : Mon Jun  1 17:49:17 2015
-## Last Modified By : Henry Xue
-## Last Modified On : Mon Aug 23 15:36:09 2021
-## Update Count     : 2
+## Last Modified By : Andrew Beach
+## Last Modified On : Mon May 17 15:00:00 2022
+## Update Count     : 3
 ###############################################################################
 
@@ -24,5 +24,5 @@
 	Tuples/Tuples.h
 
+SRC += $(SRC_TUPLES)
 
-SRC += $(SRC_TUPLES)
 SRCDEMANGLE += $(SRC_TUPLES)
Index: src/Validate/module.mk
===================================================================
--- src/Validate/module.mk	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/Validate/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -10,10 +10,14 @@
 ## Author           : Rob Schluntz
 ## Created On       : Fri Jul 27 10:10:10 2018
-## Last Modified By : Rob Schluntz
-## Last Modified On : Fri Jul 27 10:10:26 2018
-## Update Count     : 2
+## Last Modified By : Andrew Beach
+## Last Modified On : Tue May 17 14:59:00 2022
+## Update Count     : 3
 ###############################################################################
 
 SRC_VALIDATE = \
+	Validate/FindSpecialDecls.cc \
+	Validate/FindSpecialDecls.h
+
+SRC += $(SRC_VALIDATE) \
 	Validate/Autogen.cpp \
 	Validate/Autogen.hpp \
@@ -22,4 +26,5 @@
 	Validate/EliminateTypedef.cpp \
 	Validate/EliminateTypedef.hpp \
+	Validate/FindSpecialDeclsNew.cpp \
 	Validate/FixQualifiedTypes.cpp \
 	Validate/FixQualifiedTypes.hpp \
@@ -38,9 +43,5 @@
 	Validate/NoIdSymbolTable.hpp \
 	Validate/ReturnCheck.cpp \
-	Validate/ReturnCheck.hpp \
-	Validate/FindSpecialDeclsNew.cpp \
-	Validate/FindSpecialDecls.cc \
-	Validate/FindSpecialDecls.h
+	Validate/ReturnCheck.hpp
 
-SRC += $(SRC_VALIDATE)
 SRCDEMANGLE += $(SRC_VALIDATE)
Index: src/Virtual/module.mk
===================================================================
--- src/Virtual/module.mk	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/Virtual/module.mk	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -11,10 +11,11 @@
 ## Created On       : Tus Jul 25 10:18:00 2017
 ## Last Modified By : Andrew Beach
-## Last Modified On : Tus Jul 25 10:18:00 2017
-## Update Count     : 0
+## Last Modified On : Tus May 17 14:59:00 2022
+## Update Count     : 1
 ###############################################################################
 
-SRC += Virtual/ExpandCasts.cc Virtual/ExpandCasts.h \
-	Virtual/Tables.cc Virtual/Tables.h
-
-SRCDEMANGLE += Virtual/Tables.cc
+SRC += \
+	Virtual/ExpandCasts.cc \
+	Virtual/ExpandCasts.h \
+	Virtual/Tables.cc \
+	Virtual/Tables.h
Index: src/main.cc
===================================================================
--- src/main.cc	(revision 4bb5d36c9f2ab73665ea3f1cdfc6cebfb5f86823)
+++ src/main.cc	(revision 767a8efb6cd2f46125b4b2bf0c84393ab2eddcfd)
@@ -70,4 +70,5 @@
 #include "ResolvExpr/Resolver.h"            // for resolve
 #include "SymTab/Validate.h"                // for validate
+#include "SymTab/ValidateType.h"            // for linkReferenceToTypes
 #include "SynTree/LinkageSpec.h"            // for Spec, Cforall, Intrinsic
 #include "SynTree/Declaration.h"            // for Declaration
