Index: src/CodeGen/GenType.cc
===================================================================
--- src/CodeGen/GenType.cc	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/CodeGen/GenType.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -27,7 +27,6 @@
 namespace CodeGen {
 	struct GenType : public WithVisitorRef<GenType>, public WithShortCircuiting {
-		GenType( const std::string &typeString, bool pretty = false, bool genC = false, bool lineMarks = false );
-		std::string get_typeString() const { return typeString; }
-		void set_typeString( const std::string &newValue ) { typeString = newValue; }
+		std::string typeString;
+		GenType( const std::string &typeString, bool pretty, bool genC, bool lineMarks );
 
 		void previsit( BaseSyntaxNode * );
@@ -58,8 +57,7 @@
 		void genArray( const Type::Qualifiers &qualifiers, Type *base, Expression *dimension, bool isVarLen, bool isStatic );
 
-		std::string typeString;
-		bool pretty = false; // pretty print
-		bool genC = false;   // generating C code?
-		bool lineMarks = false;
+		bool pretty = false;    // pretty print
+		bool genC = false;      // generating C code?
+		bool lineMarks = false; // lineMarks on for CodeGenerator?
 	};
 
@@ -74,5 +72,5 @@
 
 		type->accept( gt );
-		return os.str() + gt.pass.get_typeString();
+		return os.str() + gt.pass.typeString;
 	}
 
Index: src/Common/Eval.cc
===================================================================
--- src/Common/Eval.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
+++ src/Common/Eval.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -0,0 +1,96 @@
+//
+// 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.
+//
+// utility.h --
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Sun May  6 22:24:16 2018
+// Update Count     : 40
+//
+
+#include <utility> // for pair
+
+#include "Common/PassVisitor.h"
+#include "InitTweak/InitTweak.h"
+#include "SynTree/Expression.h"
+
+struct Eval : public WithShortCircuiting {
+	long long int value = 0;
+	bool valid = true;
+
+	void previsit( BaseSyntaxNode * ) { visit_children = false; }
+	void postvisit( BaseSyntaxNode * ) { valid = false; }
+
+	void postvisit( ConstantExpr * expr ) {
+		value = expr->intValue();
+	}
+
+	void postvisit( CastExpr * expr ) {
+		auto arg = eval(expr->arg);
+		valid = arg.second;
+		value = arg.first;
+		// TODO: perform type conversion on value if valid
+	}
+
+	void postvisit( VariableExpr * expr ) {
+		if ( EnumInstType * inst = dynamic_cast<EnumInstType *>(expr->result) ) {
+			if ( EnumDecl * decl = inst->baseEnum ) {
+				if ( decl->valueOf( expr->var, value ) ) { // value filled by valueOf
+					return;
+				}
+			}
+		}
+		valid = false;
+	}
+
+	void postvisit( ApplicationExpr * expr ) {
+		DeclarationWithType * function = InitTweak::getFunction(expr);
+		if ( ! function || function->linkage != LinkageSpec::Intrinsic ) { valid = false; return; }
+		const std::string & fname = function->name;
+		assertf( expr->args.size() == 1 || expr->args.size() == 2, "Intrinsic function with %zd arguments: %s", expr->args.size(), fname.c_str() );
+		std::pair<long long int, bool> arg1, arg2;
+		arg1 = eval(expr->args.front());
+		valid = valid && arg1.second;
+		if ( ! valid ) return;
+		if ( expr->args.size() == 2 ) {
+			arg2 = eval(expr->args.back());
+			valid = valid && arg2.second;
+			if ( ! valid ) return;
+		}
+		if (fname == "?+?") {
+			value = arg1.first + arg2.first;
+		} else if (fname == "?-?") {
+			value = arg1.first - arg2.first;
+		} else if (fname == "?*?") {
+			value = arg1.first * arg2.first;
+		} else if (fname == "?/?") {
+			value = arg1.first / arg2.first;
+		} else if (fname == "?%?") {
+			value = arg1.first % arg2.first;
+		} else {
+			valid = false;
+		}
+		// TODO: implement other intrinsic functions
+	}
+};
+
+std::pair<long long int, bool> eval(Expression * expr) {
+	PassVisitor<Eval> ev;
+	if (expr) {
+		expr->accept(ev);
+		return std::make_pair(ev.pass.value, ev.pass.valid);
+	} else {
+		return std::make_pair(0, false);
+	}
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/Common/SemanticError.h
===================================================================
--- src/Common/SemanticError.h	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/Common/SemanticError.h	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -58,4 +58,5 @@
 	{"aggregate-forward-decl" , "forward declaration of nested aggregate: %s"  , Severity::Warn},
 	{"superfluous-decl"       , "declaration does not allocate storage: %s"    , Severity::Warn},
+	{"gcc-attributes"         , "invalid attribute: %s"                        , Severity::Warn},
 };
 
@@ -66,4 +67,5 @@
 	AggrForwardDecl,
 	SuperfluousDecl,
+	GccAttributes,
 	NUMBER_OF_WARNINGS, // This MUST be the last warning
 };
Index: src/Common/module.mk
===================================================================
--- src/Common/module.mk	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/Common/module.mk	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -19,3 +19,4 @@
        Common/DebugMalloc.cc \
        Common/Assert.cc \
-       Common/Heap.cc
+       Common/Heap.cc \
+       Common/Eval.cc
Index: src/Common/utility.h
===================================================================
--- src/Common/utility.h	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/Common/utility.h	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -31,4 +31,6 @@
 #include "Common/Indenter.h"
 
+class Expression;
+
 template< typename T >
 static inline T * maybeClone( const T *orig ) {
@@ -456,4 +458,7 @@
 } // ilog2
 
+// -----------------------------------------------------------------------------
+/// evaluates expr as a long long int. If second is false, expr could not be evaluated
+std::pair<long long int, bool> eval(Expression * expr);
 
 // Local Variables: //
Index: src/CompilationState.cc
===================================================================
--- src/CompilationState.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
+++ src/CompilationState.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -0,0 +1,45 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// CompilationState.cc --
+//
+// Author           : Rob Schluntz
+// Created On       : Mon Ju1 30 10:47:01 2018
+// Last Modified By : Rob Schluntz
+// Last Modified On : Mon Ju1 30 10:46:25 2018
+// Update Count     : 2
+//
+
+bool
+	astp = false,
+	bresolvep = false,
+	bboxp = false,
+	bcodegenp = false,
+	ctorinitp = false,
+	declstatsp = false,
+	exprp = false,
+	expraltp = false,
+	genericsp = false,
+	libcfap = false,
+	nopreludep = false,
+	noprotop = false,
+	nomainp = false,
+	parsep = false,
+	resolvep = false,
+	symtabp = false,
+	treep = false,
+	tuplep = false,
+	validp = false,
+	errorp = false,
+	codegenp = false,
+	prettycodegenp = false,
+	linemarks = false;
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End:  //
Index: src/CompilationState.h
===================================================================
--- src/CompilationState.h	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
+++ src/CompilationState.h	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -0,0 +1,51 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// CompilationState.h --
+//
+// Author           : Rob Schluntz
+// Created On       : Mon Ju1 30 10:47:01 2018
+// Last Modified By : Rob Schluntz
+// Last Modified On : Mon Ju1 30 10:46:25 2018
+// Update Count     : 2
+//
+
+extern int yydebug;                   // set for -g flag (Grammar)
+extern bool
+	astp,
+	bresolvep,
+	bboxp,
+	bcodegenp,
+	ctorinitp,
+	declstatsp,
+	exprp,
+	expraltp,
+	genericsp,
+	libcfap,
+	nopreludep,
+	noprotop,
+	nomainp,
+	parsep,
+	resolvep,
+	symtabp,
+	treep,
+	tuplep,
+	validp,
+	errorp,
+	codegenp,
+	prettycodegenp,
+	linemarks;
+
+// is the compiler building prelude or libcfa?
+inline bool buildingLibrary() {
+	return libcfap | treep;
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End:  //
Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/InitTweak/FixGlobalInit.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -37,5 +37,5 @@
 	class GlobalFixer : public WithShortCircuiting {
 	  public:
-		GlobalFixer( const std::string & name, bool inLibrary );
+		GlobalFixer( bool inLibrary );
 
 		void previsit( ObjectDecl *objDecl );
@@ -52,6 +52,6 @@
 	};
 
-	void fixGlobalInit( std::list< Declaration * > & translationUnit, const std::string & name, bool inLibrary ) {
-		PassVisitor<GlobalFixer> visitor( name, inLibrary );
+	void fixGlobalInit( std::list< Declaration * > & translationUnit, bool inLibrary ) {
+		PassVisitor<GlobalFixer> visitor( inLibrary );
 		acceptAll( translationUnit, visitor );
 		GlobalFixer & fixer = visitor.pass;
@@ -70,15 +70,5 @@
 	}
 
-  std::string globalFunctionName( const std::string & name ) {
-  	// get basename
-  	std::string ret = name.substr( 0, name.find( '.' ) );
-  	// replace invalid characters with _
-		static std::string invalid = "/-@";
-  	replace_if( ret.begin(), ret.end(), []( char c ) { return invalid.find(c) != std::string::npos; }, '_' );
-  	return ret;
-  }
-
-	GlobalFixer::GlobalFixer( const std::string & name, bool inLibrary ) : tempNamer( "_global_init" ) {
-		std::string fixedName = globalFunctionName( name );
+	GlobalFixer::GlobalFixer( bool inLibrary ) : tempNamer( "_global_init" ) {
 		std::list< Expression * > ctorParameters;
 		std::list< Expression * > dtorParameters;
@@ -90,10 +80,12 @@
 			// for library code are run before constructors and destructors for user code,
 			// specify a priority when building the library. Priorities 0-100 are reserved by gcc.
-			ctorParameters.push_back( new ConstantExpr( Constant::from_int( 102 ) ) );
-			dtorParameters.push_back( new ConstantExpr( Constant::from_int( 102 ) ) );
+			// Priorities 101-200 are reserved by cfa, so use priority 200 for CFA library globals,
+			// allowing room for overriding with a higher priority.
+			ctorParameters.push_back( new ConstantExpr( Constant::from_int( 200 ) ) );
+			dtorParameters.push_back( new ConstantExpr( Constant::from_int( 200 ) ) );
 		}
-		initFunction = new FunctionDecl( "_init_" + fixedName, Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
+		initFunction = new FunctionDecl( "__global_init__", Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
 		initFunction->get_attributes().push_back( new Attribute( "constructor", ctorParameters ) );
-		destroyFunction = new FunctionDecl( "_destroy_" + fixedName, Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
+		destroyFunction = new FunctionDecl( "__global_destroy__", Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
 		destroyFunction->get_attributes().push_back( new Attribute( "destructor", dtorParameters ) );
 	}
@@ -110,23 +102,23 @@
 		if ( ConstructorInit * ctorInit = dynamic_cast< ConstructorInit * >( objDecl->get_init() ) ) {
 			// a decision should have been made by the resolver, so ctor and init are not both non-NULL
-			assert( ! ctorInit->get_ctor() || ! ctorInit->get_init() );
+			assert( ! ctorInit->ctor || ! ctorInit->init );
 
-			Statement * dtor = ctorInit->get_dtor();
+			Statement * dtor = ctorInit->dtor;
 			if ( dtor && ! isIntrinsicSingleArgCallStmt( dtor ) ) {
 				// don't need to call intrinsic dtor, because it does nothing, but
 				// non-intrinsic dtors must be called
 				destroyStatements.push_front( dtor );
-				ctorInit->set_dtor( NULL );
+				ctorInit->dtor = nullptr;
 			} // if
-			if ( Statement * ctor = ctorInit->get_ctor() ) {
+			if ( Statement * ctor = ctorInit->ctor ) {
 				initStatements.push_back( ctor );
-				objDecl->set_init( NULL );
-				ctorInit->set_ctor( NULL );
-			} else if ( Initializer * init = ctorInit->get_init() ) {
-				objDecl->set_init( init );
-				ctorInit->set_init( NULL );
+				objDecl->init = nullptr;
+				ctorInit->ctor = nullptr;
+			} else if ( Initializer * init = ctorInit->init ) {
+				objDecl->init = init;
+				ctorInit->init = nullptr;
 			} else {
 				// no constructor and no initializer, which is okay
-				objDecl->set_init( NULL );
+				objDecl->init = nullptr;
 			} // if
 			delete ctorInit;
Index: src/InitTweak/FixGlobalInit.h
===================================================================
--- src/InitTweak/FixGlobalInit.h	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/InitTweak/FixGlobalInit.h	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -22,12 +22,8 @@
 
 namespace InitTweak {
-  /// Moves global initialization into an _init function that is unique to the translation unit.
-  /// Sets the priority of the initialization function depending on whether the initialization
-  /// function is for library code.
-  void fixGlobalInit( std::list< Declaration * > & translationUnit, const std::string & name, bool inLibrary );
-
-  /// Apply transformations to a file name to get a valid C identifier which will be used as
-  /// the name of the generated initializer function.
-  std::string globalFunctionName( const std::string & name );
+	/// Moves global initialization into an _init function that is unique to the translation unit.
+	/// Sets the priority of the initialization function depending on whether the initialization
+	/// function is for library code.
+	void fixGlobalInit( std::list< Declaration * > & translationUnit, bool inLibrary );
 } // namespace
 
Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/InitTweak/FixInit.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -238,10 +238,10 @@
 	} // namespace
 
-	void fix( std::list< Declaration * > & translationUnit, const std::string & filename, bool inLibrary ) {
+	void fix( std::list< Declaration * > & translationUnit, bool inLibrary ) {
 		PassVisitor<SelfAssignChecker> checker;
 		acceptAll( translationUnit, checker );
 
 		// fixes ConstructorInit for global variables. should happen before fixInitializers.
-		InitTweak::fixGlobalInit( translationUnit, filename, inLibrary );
+		InitTweak::fixGlobalInit( translationUnit, inLibrary );
 
 		UnqCount unqCount;
Index: src/InitTweak/FixInit.h
===================================================================
--- src/InitTweak/FixInit.h	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/InitTweak/FixInit.h	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -24,5 +24,5 @@
   /// replace constructor initializers with expression statements
   /// and unwrap basic C-style initializers
-	void fix( std::list< Declaration * > & translationUnit, const std::string & name, bool inLibrary );
+	void fix( std::list< Declaration * > & translationUnit, bool inLibrary );
 } // namespace
 
Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/InitTweak/InitTweak.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -408,5 +408,5 @@
 		return allofCtorDtor( stmt, []( Expression * callExpr ){
 			if ( ApplicationExpr * appExpr = isIntrinsicCallExpr( callExpr ) ) {
-				FunctionType *funcType = GenPoly::getFunctionType( appExpr->get_function()->get_result() );
+				FunctionType *funcType = GenPoly::getFunctionType( appExpr->function->result );
 				assert( funcType );
 				return funcType->get_parameters().size() == 1;
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/Makefile.am	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -19,5 +19,6 @@
 
 SRC = main.cc \
-      MakeLibCfa.cc
+      MakeLibCfa.cc \
+      CompilationState.cc
 
 MAINTAINERCLEANFILES =
@@ -37,4 +38,5 @@
 include SynTree/module.mk
 include Tuples/module.mk
+include Validate/module.mk
 include Virtual/module.mk
 
Index: src/Makefile.in
===================================================================
--- src/Makefile.in	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/Makefile.in	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -23,4 +23,7 @@
 #SRC +=  ArgTweak/Rewriter.cc \
 #	ArgTweak/Mutate.cc
+
+######################### -*- Mode: Makefile-Gmake -*- ########################
+###############################################################################
 
 ######################### -*- Mode: Makefile-Gmake -*- ########################
@@ -150,4 +153,5 @@
 am__objects_1 = driver_cfa_cpp-main.$(OBJEXT) \
 	driver_cfa_cpp-MakeLibCfa.$(OBJEXT) \
+	driver_cfa_cpp-CompilationState.$(OBJEXT) \
 	CodeGen/driver_cfa_cpp-Generate.$(OBJEXT) \
 	CodeGen/driver_cfa_cpp-CodeGenerator.$(OBJEXT) \
@@ -165,4 +169,5 @@
 	Common/driver_cfa_cpp-Assert.$(OBJEXT) \
 	Common/driver_cfa_cpp-Heap.$(OBJEXT) \
+	Common/driver_cfa_cpp-Eval.$(OBJEXT) \
 	ControlStruct/driver_cfa_cpp-LabelGenerator.$(OBJEXT) \
 	ControlStruct/driver_cfa_cpp-LabelFixer.$(OBJEXT) \
@@ -254,4 +259,5 @@
 	Tuples/driver_cfa_cpp-TupleExpansion.$(OBJEXT) \
 	Tuples/driver_cfa_cpp-Explode.$(OBJEXT) \
+	Validate/driver_cfa_cpp-HandleAttributes.$(OBJEXT) \
 	Virtual/driver_cfa_cpp-ExpandCasts.$(OBJEXT)
 am_driver_cfa_cpp_OBJECTS = $(am__objects_1)
@@ -352,7 +358,8 @@
 	$(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk \
 	$(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk \
-	$(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk \
-	$(top_srcdir)/automake/depcomp $(top_srcdir)/automake/ylwrap \
-	Parser/lex.cc Parser/parser.cc Parser/parser.hh
+	$(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk \
+	$(srcdir)/Virtual/module.mk $(top_srcdir)/automake/depcomp \
+	$(top_srcdir)/automake/ylwrap Parser/lex.cc Parser/parser.cc \
+	Parser/parser.hh
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -483,5 +490,5 @@
 # create object files in directory with source files
 AUTOMAKE_OPTIONS = subdir-objects
-SRC = main.cc MakeLibCfa.cc CodeGen/Generate.cc \
+SRC = main.cc MakeLibCfa.cc CompilationState.cc CodeGen/Generate.cc \
 	CodeGen/CodeGenerator.cc CodeGen/GenType.cc \
 	CodeGen/FixNames.cc CodeGen/FixMain.cc \
@@ -490,5 +497,5 @@
 	Concurrency/Waitfor.cc Common/SemanticError.cc \
 	Common/UniqueName.cc Common/DebugMalloc.cc Common/Assert.cc \
-	Common/Heap.cc ControlStruct/LabelGenerator.cc \
+	Common/Heap.cc Common/Eval.cc ControlStruct/LabelGenerator.cc \
 	ControlStruct/LabelFixer.cc ControlStruct/MLEMutator.cc \
 	ControlStruct/Mutate.cc ControlStruct/ForExprMutator.cc \
@@ -532,5 +539,6 @@
 	SynTree/Attribute.cc SynTree/DeclReplacer.cc \
 	Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc \
-	Tuples/Explode.cc Virtual/ExpandCasts.cc
+	Tuples/Explode.cc Validate/HandleAttributes.cc \
+	Virtual/ExpandCasts.cc
 MAINTAINERCLEANFILES = Parser/parser.output ${libdir}/${notdir \
 	${cfa_cpplib_PROGRAMS}}
@@ -551,5 +559,5 @@
 .SUFFIXES:
 .SUFFIXES: .cc .ll .o .obj .yy
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk $(srcdir)/Virtual/module.mk $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -571,5 +579,5 @@
 	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
-$(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk $(am__empty):
+$(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk $(srcdir)/Virtual/module.mk $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -678,4 +686,6 @@
 	Common/$(DEPDIR)/$(am__dirstamp)
 Common/driver_cfa_cpp-Heap.$(OBJEXT): Common/$(am__dirstamp) \
+	Common/$(DEPDIR)/$(am__dirstamp)
+Common/driver_cfa_cpp-Eval.$(OBJEXT): Common/$(am__dirstamp) \
 	Common/$(DEPDIR)/$(am__dirstamp)
 ControlStruct/$(am__dirstamp):
@@ -932,4 +942,12 @@
 Tuples/driver_cfa_cpp-Explode.$(OBJEXT): Tuples/$(am__dirstamp) \
 	Tuples/$(DEPDIR)/$(am__dirstamp)
+Validate/$(am__dirstamp):
+	@$(MKDIR_P) Validate
+	@: > Validate/$(am__dirstamp)
+Validate/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) Validate/$(DEPDIR)
+	@: > Validate/$(DEPDIR)/$(am__dirstamp)
+Validate/driver_cfa_cpp-HandleAttributes.$(OBJEXT):  \
+	Validate/$(am__dirstamp) Validate/$(DEPDIR)/$(am__dirstamp)
 Virtual/$(am__dirstamp):
 	@$(MKDIR_P) Virtual
@@ -962,4 +980,5 @@
 	-rm -f SynTree/*.$(OBJEXT)
 	-rm -f Tuples/*.$(OBJEXT)
+	-rm -f Validate/*.$(OBJEXT)
 	-rm -f Virtual/*.$(OBJEXT)
 
@@ -967,4 +986,5 @@
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver_cfa_cpp-CompilationState.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver_cfa_cpp-MakeLibCfa.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver_cfa_cpp-main.Po@am__quote@
@@ -979,4 +999,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Assert.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Eval.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Heap.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-SemanticError.Po@am__quote@
@@ -1073,4 +1094,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleAssignment.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleExpansion.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Po@am__quote@
 
@@ -1119,4 +1141,18 @@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o driver_cfa_cpp-MakeLibCfa.obj `if test -f 'MakeLibCfa.cc'; then $(CYGPATH_W) 'MakeLibCfa.cc'; else $(CYGPATH_W) '$(srcdir)/MakeLibCfa.cc'; fi`
 
+driver_cfa_cpp-CompilationState.o: CompilationState.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT driver_cfa_cpp-CompilationState.o -MD -MP -MF $(DEPDIR)/driver_cfa_cpp-CompilationState.Tpo -c -o driver_cfa_cpp-CompilationState.o `test -f 'CompilationState.cc' || echo '$(srcdir)/'`CompilationState.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/driver_cfa_cpp-CompilationState.Tpo $(DEPDIR)/driver_cfa_cpp-CompilationState.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='CompilationState.cc' object='driver_cfa_cpp-CompilationState.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o driver_cfa_cpp-CompilationState.o `test -f 'CompilationState.cc' || echo '$(srcdir)/'`CompilationState.cc
+
+driver_cfa_cpp-CompilationState.obj: CompilationState.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT driver_cfa_cpp-CompilationState.obj -MD -MP -MF $(DEPDIR)/driver_cfa_cpp-CompilationState.Tpo -c -o driver_cfa_cpp-CompilationState.obj `if test -f 'CompilationState.cc'; then $(CYGPATH_W) 'CompilationState.cc'; else $(CYGPATH_W) '$(srcdir)/CompilationState.cc'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/driver_cfa_cpp-CompilationState.Tpo $(DEPDIR)/driver_cfa_cpp-CompilationState.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='CompilationState.cc' object='driver_cfa_cpp-CompilationState.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o driver_cfa_cpp-CompilationState.obj `if test -f 'CompilationState.cc'; then $(CYGPATH_W) 'CompilationState.cc'; else $(CYGPATH_W) '$(srcdir)/CompilationState.cc'; fi`
+
 CodeGen/driver_cfa_cpp-Generate.o: CodeGen/Generate.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeGen/driver_cfa_cpp-Generate.o -MD -MP -MF CodeGen/$(DEPDIR)/driver_cfa_cpp-Generate.Tpo -c -o CodeGen/driver_cfa_cpp-Generate.o `test -f 'CodeGen/Generate.cc' || echo '$(srcdir)/'`CodeGen/Generate.cc
@@ -1329,4 +1365,18 @@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-Heap.obj `if test -f 'Common/Heap.cc'; then $(CYGPATH_W) 'Common/Heap.cc'; else $(CYGPATH_W) '$(srcdir)/Common/Heap.cc'; fi`
 
+Common/driver_cfa_cpp-Eval.o: Common/Eval.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Common/driver_cfa_cpp-Eval.o -MD -MP -MF Common/$(DEPDIR)/driver_cfa_cpp-Eval.Tpo -c -o Common/driver_cfa_cpp-Eval.o `test -f 'Common/Eval.cc' || echo '$(srcdir)/'`Common/Eval.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) Common/$(DEPDIR)/driver_cfa_cpp-Eval.Tpo Common/$(DEPDIR)/driver_cfa_cpp-Eval.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='Common/Eval.cc' object='Common/driver_cfa_cpp-Eval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-Eval.o `test -f 'Common/Eval.cc' || echo '$(srcdir)/'`Common/Eval.cc
+
+Common/driver_cfa_cpp-Eval.obj: Common/Eval.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Common/driver_cfa_cpp-Eval.obj -MD -MP -MF Common/$(DEPDIR)/driver_cfa_cpp-Eval.Tpo -c -o Common/driver_cfa_cpp-Eval.obj `if test -f 'Common/Eval.cc'; then $(CYGPATH_W) 'Common/Eval.cc'; else $(CYGPATH_W) '$(srcdir)/Common/Eval.cc'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) Common/$(DEPDIR)/driver_cfa_cpp-Eval.Tpo Common/$(DEPDIR)/driver_cfa_cpp-Eval.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='Common/Eval.cc' object='Common/driver_cfa_cpp-Eval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-Eval.obj `if test -f 'Common/Eval.cc'; then $(CYGPATH_W) 'Common/Eval.cc'; else $(CYGPATH_W) '$(srcdir)/Common/Eval.cc'; fi`
+
 ControlStruct/driver_cfa_cpp-LabelGenerator.o: ControlStruct/LabelGenerator.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT ControlStruct/driver_cfa_cpp-LabelGenerator.o -MD -MP -MF ControlStruct/$(DEPDIR)/driver_cfa_cpp-LabelGenerator.Tpo -c -o ControlStruct/driver_cfa_cpp-LabelGenerator.o `test -f 'ControlStruct/LabelGenerator.cc' || echo '$(srcdir)/'`ControlStruct/LabelGenerator.cc
@@ -2574,4 +2624,18 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Tuples/driver_cfa_cpp-Explode.obj `if test -f 'Tuples/Explode.cc'; then $(CYGPATH_W) 'Tuples/Explode.cc'; else $(CYGPATH_W) '$(srcdir)/Tuples/Explode.cc'; fi`
+
+Validate/driver_cfa_cpp-HandleAttributes.o: Validate/HandleAttributes.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Validate/driver_cfa_cpp-HandleAttributes.o -MD -MP -MF Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Tpo -c -o Validate/driver_cfa_cpp-HandleAttributes.o `test -f 'Validate/HandleAttributes.cc' || echo '$(srcdir)/'`Validate/HandleAttributes.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Tpo Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='Validate/HandleAttributes.cc' object='Validate/driver_cfa_cpp-HandleAttributes.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Validate/driver_cfa_cpp-HandleAttributes.o `test -f 'Validate/HandleAttributes.cc' || echo '$(srcdir)/'`Validate/HandleAttributes.cc
+
+Validate/driver_cfa_cpp-HandleAttributes.obj: Validate/HandleAttributes.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Validate/driver_cfa_cpp-HandleAttributes.obj -MD -MP -MF Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Tpo -c -o Validate/driver_cfa_cpp-HandleAttributes.obj `if test -f 'Validate/HandleAttributes.cc'; then $(CYGPATH_W) 'Validate/HandleAttributes.cc'; else $(CYGPATH_W) '$(srcdir)/Validate/HandleAttributes.cc'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Tpo Validate/$(DEPDIR)/driver_cfa_cpp-HandleAttributes.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='Validate/HandleAttributes.cc' object='Validate/driver_cfa_cpp-HandleAttributes.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Validate/driver_cfa_cpp-HandleAttributes.obj `if test -f 'Validate/HandleAttributes.cc'; then $(CYGPATH_W) 'Validate/HandleAttributes.cc'; else $(CYGPATH_W) '$(srcdir)/Validate/HandleAttributes.cc'; fi`
 
 Virtual/driver_cfa_cpp-ExpandCasts.o: Virtual/ExpandCasts.cc
@@ -2736,4 +2800,6 @@
 	-rm -f Tuples/$(DEPDIR)/$(am__dirstamp)
 	-rm -f Tuples/$(am__dirstamp)
+	-rm -f Validate/$(DEPDIR)/$(am__dirstamp)
+	-rm -f Validate/$(am__dirstamp)
 	-rm -f Virtual/$(DEPDIR)/$(am__dirstamp)
 	-rm -f Virtual/$(am__dirstamp)
@@ -2753,5 +2819,5 @@
 
 distclean: distclean-am
-	-rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Virtual/$(DEPDIR)
+	-rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Validate/$(DEPDIR) Virtual/$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
@@ -2799,5 +2865,5 @@
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Virtual/$(DEPDIR)
+	-rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Validate/$(DEPDIR) Virtual/$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
Index: src/ResolvExpr/CurrentObject.cc
===================================================================
--- src/ResolvExpr/CurrentObject.cc	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/ResolvExpr/CurrentObject.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -139,8 +139,8 @@
 		ArrayIterator( ArrayType * at ) : array( at ) {
 			PRINT( std::cerr << "Creating array iterator: " << at << std::endl; )
-			base = at->get_base();
+			base = at->base;
 			memberIter = createMemberIterator( base );
-			if ( at->isVarLen ) SemanticError( at, "VLA initialization does not support @=" );
-			setSize( at->get_dimension() );
+			if ( at->isVarLen ) SemanticError( at, "VLA initialization does not support @=: " );
+			setSize( at->dimension );
 		}
 
@@ -150,23 +150,10 @@
 
 	private:
-		void setSize( Expression * expr ) {
-			if ( ConstantExpr * constExpr = dynamic_cast< ConstantExpr * >( expr ) ) {
-				try {
-					size = constExpr->intValue();
-					PRINT( std::cerr << "array type with size: " << size << std::endl; )
-				} catch ( SemanticErrorException & ) {
-					SemanticError( expr, "Constant expression of non-integral type in array dimension: " );
-				}
-			}	else if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( expr ) ) {
-				setSize( castExpr->get_arg() ); // xxx - need to perform the conversion specified by the cast
-			} else if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( expr ) ) {
-				if ( EnumInstType * inst = dynamic_cast< EnumInstType * > ( varExpr->result ) ) {
-					long long int value;
-					if ( inst->baseEnum->valueOf( varExpr->var, value ) ) {
-						size = value;
-					}
-				}
+		void setSize( Expression * expr ) { // replace this logic with an eval call
+			auto res = eval(expr);
+			if (res.second) {
+				size = res.first;
 			} else {
-				assertf( false, "unhandled expression in setSize: %s", toString( expr ).c_str() ); // xxx - if not a constant expression, it's not simple to determine how long the array actually is, which is necessary for initialization to be done correctly -- fix this
+				SemanticError( expr->location, toString("Array designator must be a constant expression: ", expr) );
 			}
 		}
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/SymTab/Validate.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -61,4 +61,5 @@
 #include "Parser/LinkageSpec.h"        // for C
 #include "ResolvExpr/typeops.h"        // for typesCompatible
+#include "ResolvExpr/Resolver.h"       // for findSingleExpression
 #include "SymTab/Autogen.h"            // for SizeType
 #include "SynTree/Attribute.h"         // for noAttributes, Attribute
@@ -72,4 +73,5 @@
 #include "SynTree/TypeSubstitution.h"  // for TypeSubstitution
 #include "SynTree/Visitor.h"           // for Visitor
+#include "Validate/HandleAttributes.h" // for handleAttributes
 
 class CompoundStmt;
@@ -247,5 +249,5 @@
 	};
 
-	struct ArrayLength {
+	struct ArrayLength : public WithIndexer {
 		/// for array types without an explicit length, compute the length and store it so that it
 		/// is known to the rest of the phases. For example,
@@ -258,4 +260,5 @@
 
 		void previsit( ObjectDecl * objDecl );
+		void previsit( ArrayType * arrayType );
 	};
 
@@ -312,4 +315,5 @@
 		acceptAll( translationUnit, finder ); // xxx - remove this pass soon
 		mutateAll( translationUnit, labelAddrFixer );
+		Validate::handleAttributes( translationUnit );
 	}
 
@@ -1232,8 +1236,20 @@
 	void ArrayLength::previsit( ObjectDecl * objDecl ) {
 		if ( ArrayType * at = dynamic_cast< ArrayType * >( objDecl->type ) ) {
-			if ( at->get_dimension() ) return;
+			if ( at->dimension ) return;
 			if ( ListInit * init = dynamic_cast< ListInit * >( objDecl->init ) ) {
-				at->set_dimension( new ConstantExpr( Constant::from_ulong( init->initializers.size() ) ) );
-			}
+				at->dimension = new ConstantExpr( Constant::from_ulong( init->initializers.size() ) );
+			}
+		}
+	}
+
+	void ArrayLength::previsit( ArrayType * type ) {
+		if ( type->dimension ) {
+			// need to resolve array dimensions early so that constructor code can correctly determine
+			// if a type is a VLA (and hence whether its elements need to be constructed)
+			ResolvExpr::findSingleExpression( type->dimension, SymTab::SizeType->clone(), indexer );
+
+			// must re-evaluate whether a type is a VLA, now that more information is available
+			// (e.g. the dimension may have been an enumerator, which was unknown prior to this step)
+			type->isVarLen = ! InitTweak::isConstExpr( type->dimension );
 		}
 	}
Index: src/Validate/HandleAttributes.cc
===================================================================
--- src/Validate/HandleAttributes.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
+++ src/Validate/HandleAttributes.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -0,0 +1,85 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// HandleAttributes.cc --
+//
+// Author           : Rob Schluntz
+// Created On       : Fri Jul 27 10:15:06 2018
+// Last Modified By : Rob Schluntz
+// Last Modified On : Fri Jul 27 10:16:43 2018
+// Update Count     : 2
+//
+
+#include "HandleAttributes.h"
+
+#include "CompilationState.h"
+#include "Common/PassVisitor.h"
+#include "Common/SemanticError.h"
+#include "ResolvExpr/Resolver.h"
+#include "SynTree/Attribute.h"
+#include "SynTree/Declaration.h"
+#include "SynTree/Type.h"
+
+namespace Validate {
+	namespace {
+		struct HandleAttributes : public WithIndexer {
+			void previsit( ObjectDecl * decl );
+			void previsit( FunctionDecl * decl );
+		};
+	} // namespace
+
+	void handleAttributes( std::list< Declaration * > &translationUnit ) {
+		PassVisitor<HandleAttributes> handler;
+		acceptAll( translationUnit, handler );
+	}
+
+	namespace {
+		void HandleAttributes::previsit( ObjectDecl * decl ) {
+			for ( Attribute * attr : decl->attributes ) {
+				std::string name = attr->normalizedName();
+				if (name == "init_priority") {
+					// TODO: implement C++-like init_priority attribute
+				}
+			}
+		}
+
+		void HandleAttributes::previsit( FunctionDecl * decl ) {
+			for ( Attribute * attr : decl->attributes ) {
+				std::string name = attr->normalizedName();
+				if (name == "constructor" || name == "destructor") {
+					if (attr->parameters.size() == 1) {
+						Expression *& arg = attr->parameters.front();
+						ResolvExpr::findSingleExpression( arg, new BasicType( Type::Qualifiers(), BasicType::LongLongSignedInt ), indexer );
+						auto result = eval(arg);
+						if (! result.second) {
+							SemanticWarning(attr->location, Warning::GccAttributes,
+								toCString( name, " priorities must be integers from 0 to 65535 inclusive: ", arg ) );
+							return;
+						}
+						auto priority = result.first;
+						if (priority < 101) {
+							SemanticWarning(attr->location, Warning::GccAttributes,
+								toCString( name, " priorities from 0 to 100 are reserved for the implementation" ) );
+						} else if (priority < 201 && ! buildingLibrary()) {
+							SemanticWarning(attr->location, Warning::GccAttributes,
+								toCString( name, " priorities from 101 to 200 are reserved for the implementation" ) );
+						}
+					} else if (attr->parameters.size() > 1) {
+						SemanticWarning(attr->location, Warning::GccAttributes, toCString( "too many arguments to ", name, " attribute" ) );
+					} else {
+						SemanticWarning(attr->location, Warning::GccAttributes, toCString( "too few arguments to ", name, " attribute" ) );
+					}
+				}
+			}
+		}
+	} // namespace
+} // namespace Validate
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/Validate/HandleAttributes.h
===================================================================
--- src/Validate/HandleAttributes.h	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
+++ src/Validate/HandleAttributes.h	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -0,0 +1,30 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// HandleAttributes.h --
+//
+// Author           : Rob Schluntz
+// Created On       : Fri Jul 27 10:10:10 2018
+// Last Modified By : Rob Schluntz
+// Last Modified On : Fri Jul 27 10:12:53 2018
+// Update Count     : 2
+//
+
+#pragma once
+
+#include <list>  // for list
+
+class Declaration;
+
+namespace Validate {
+	void handleAttributes( std::list< Declaration * > &translationUnit );
+} // namespace Validate
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/Validate/module.mk
===================================================================
--- src/Validate/module.mk	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
+++ src/Validate/module.mk	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -0,0 +1,17 @@
+######################### -*- Mode: Makefile-Gmake -*- ########################
+##
+## Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
+##
+## The contents of this file are covered under the licence agreement in the
+## file "LICENCE" distributed with Cforall.
+##
+## module.mk --
+##
+## 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
+###############################################################################
+
+SRC += Validate/HandleAttributes.cc
Index: src/main.cc
===================================================================
--- src/main.cc	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/main.cc	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -28,4 +28,5 @@
 #include <string>                           // for char_traits, operator<<
 
+#include "CompilationState.h"
 #include "../config.h"                      // for CFA_LIBDIR
 #include "CodeGen/FixMain.h"                // for FixMain
@@ -72,30 +73,4 @@
 DeclarationNode * parseTree = nullptr;					// program parse tree
 
-extern int yydebug;										// set for -g flag (Grammar)
-bool
-	astp = false,
-	bresolvep = false,
-	bboxp = false,
-	bcodegenp = false,
-	ctorinitp = false,
-	declstatsp = false,
-	exprp = false,
-	expraltp = false,
-	genericsp = false,
-	libcfap = false,
-	nopreludep = false,
-	noprotop = false,
-	nomainp = false,
-	parsep = false,
-	resolvep = false,									// used in AlternativeFinder
-	symtabp = false,
-	treep = false,
-	tuplep = false,
-	validp = false,
-	errorp = false,
-	codegenp = false,
-	prettycodegenp = false,
-	linemarks = false;
-
 static void parse_cmdline( int argc, char *argv[], const char *& filename );
 static void parse( FILE * input, LinkageSpec::Spec linkage, bool shouldExit = false );
@@ -208,10 +183,10 @@
 
 			// Read to gcc builtins, if not generating the cfa library
-			FILE * gcc_builtins = fopen( libcfap | treep ? "../prelude/gcc-builtins.cf" : CFA_LIBDIR "/gcc-builtins.cf", "r" );
+			FILE * gcc_builtins = fopen( buildingLibrary() ? "../prelude/gcc-builtins.cf" : CFA_LIBDIR "/gcc-builtins.cf", "r" );
 			assertf( gcc_builtins, "cannot open gcc-builtins.cf\n" );
 			parse( gcc_builtins, LinkageSpec::Compiler );
 
 			// read the extra prelude in, if not generating the cfa library
-			FILE * extras = fopen( libcfap | treep ? "../prelude/extras.cf" : CFA_LIBDIR "/extras.cf", "r" );
+			FILE * extras = fopen( buildingLibrary() ? "../prelude/extras.cf" : CFA_LIBDIR "/extras.cf", "r" );
 			assertf( extras, "cannot open extras.cf\n" );
 			parse( extras, LinkageSpec::BuiltinC );
@@ -219,10 +194,10 @@
 			if ( ! libcfap ) {
 				// read the prelude in, if not generating the cfa library
-				FILE * prelude = fopen( treep ? "../prelude/prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
+				FILE * prelude = fopen( buildingLibrary() ? "../prelude/prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
 				assertf( prelude, "cannot open prelude.cf\n" );
 				parse( prelude, LinkageSpec::Intrinsic );
 
 				// Read to cfa builtins, if not generating the cfa library
-				FILE * builtins = fopen( libcfap | treep ? "../prelude/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
+				FILE * builtins = fopen( buildingLibrary() ? "../prelude/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
 				assertf( builtins, "cannot open builtins.cf\n" );
 				parse( builtins, LinkageSpec::BuiltinCFA );
@@ -299,5 +274,5 @@
 
 		// fix ObjectDecl - replaces ConstructorInit nodes
-		PASS( "fixInit", InitTweak::fix( translationUnit, filename, libcfap || treep ) );
+		PASS( "fixInit", InitTweak::fix( translationUnit, buildingLibrary() ) );
 		if ( ctorinitp ) {
 			dump ( translationUnit );
Index: src/tests/.expect/attributes.x64.txt
===================================================================
--- src/tests/.expect/attributes.x64.txt	(revision f7ac09db66c129f692946799a998876f7b6df2b5)
+++ src/tests/.expect/attributes.x64.txt	(revision 3537dd7d027268abe3ab0f820a4c00f09dc37215)
@@ -316,6 +316,6 @@
     ((void)sizeof(__attribute__ ((unused,unused)) signed int ));
     ((void)sizeof(__attribute__ ((unused,unused,unused,unused)) signed int **));
-    ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int [5]));
-    ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int (*)[10]));
+    ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int [((unsigned long int )5)]));
+    ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int (*)[((unsigned long int )10)]));
     ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int ()));
     struct __attribute__ ((unused)) __anonymous3 {
