Index: Jenkins/FullBuild
===================================================================
--- Jenkins/FullBuild	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ Jenkins/FullBuild	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -161,5 +161,5 @@
 """
 
-	def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com"
+	def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com, ajbeach@edu.uwaterloo.ca"
 
 	//send email notification
Index: Jenkins/TestRegen
===================================================================
--- Jenkins/TestRegen	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
+++ Jenkins/TestRegen	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -0,0 +1,128 @@
+#!groovy
+
+node ('master') {
+
+	user_email = ''
+	test_list = ''
+
+	prepare_build()
+
+	try {
+
+		stage('Checkout') {
+			checkout scm
+
+			sh 'git clean -xdf'
+
+			sh 'git reset --hard'
+		}
+
+		stage('Building x86') {
+			regen_tests('i386')
+		}
+
+		stage('Building x64') {
+			regen_tests('x86_64')
+		}
+
+		stage('Patching') {
+			make_patch()
+		}
+
+		stage('Email') {
+			email()
+		}
+	} 
+	catch (Exception caughtError) {
+		email_error()
+
+		throw caughtError
+	}
+}
+
+def prepare_build() {
+	properties ([ 													\
+		[$class: 'ParametersDefinitionProperty', 								\
+			parameterDefinitions: [ 									\
+				[$class: 'StringParameterDefinition',						\
+					description: 'Who required the test',					\
+					name: 'pEmail',									\
+				],												\
+				[$class: 'StringParameterDefinition',						\
+					description: 'Space separated list of tests to run',			\
+					name: 'pTests',									\
+				],												\
+			],
+		]])
+
+	user_email = pEmail;
+	test_list  = pTests;
+
+	echo "User ${user_email} requested regenerating tests : ${ test_list }"
+}
+
+def regen_tests( String arch ) {
+
+	def install_dir = pwd tmp: true
+		
+	//Configure the conpilation (Output is not relevant)
+	//Use the current directory as the installation target so nothing
+	//escapes the sandbox
+	//Also specify the compiler by hand
+	sh "./configure CXX=clang++ --host=${arch} --with-backend-compiler=gcc-6 --prefix=${install_dir} --enable-silent-rules --quiet"
+
+	//Compile the project
+	sh 'make -j 8 --no-print-directory install'
+
+	//Regenerate the desired tests
+	sh "src/tests/test.py --regenerate-expected ${test_list}"
+
+	//Clean everything from the last build
+	sh 'make maintainer-clean > /dev/null'
+}
+
+def make_patch() {
+
+	def target_dir = pwd tmp: true
+
+	//Add every file so new files appear in the diff
+	sh 'git add .'
+
+	//Create a patch file
+	sh "git diff --cached --binary > ${target_dir}/result.patch"
+}
+
+def email() {
+
+	def target_dir = pwd tmp: true
+
+	dir( target_dir ) {
+
+		def email_subject = "[cforall dashboard][TEST REGEN# ${env.BUILD_NUMBER}] - Result"
+		def email_body = """This is an automated email from the Jenkins build machine. It was
+generated http://plg2:8082/dashboard.
+
+Please apply the required changes using the following method :
+    - copy result.patch to your cforall repository of choice.
+    - call 'git apply [patch file name]' (WARNING: the changes may conflict with any current changes to the test expected results).
+    - validate that the changes are correct.
+    - commit the changes as usual."""
+
+		//send email notification
+		emailext body: email_body, subject: email_subject, to: user_email, attachmentsPattern: "**/*.patch"
+	}
+}
+
+def email_error() {
+
+	def email_subject = "[cforall dashboard][TEST REGEN# ${env.BUILD_NUMBER}] - FAILURE"
+	def email_body = """This is an automated email from the Jenkins build machine. It was
+generated http://plg2:8082/dashboard.
+
+Test generation encoutered an error please see attached logs
+
+-----------------------------------------------------------------------"""
+
+	//send email notification
+	emailext body: email_body, subject: email_subject, to: user_email, attachLog: true
+}
Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ Jenkinsfile	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -153,12 +153,12 @@
 	do_sendemail	= ! (pSilent == 'true')
 
-	echo """Compiler 		: ${compiler.cc_name} (${compiler.cpp_cc}/${compiler.cfa_cc})
-Architecture		: ${arch_name}
-Arc Flags		: ${architecture}
-Run All Tests		: ${ pRunAllTests.toString() }
-Run Benchmark		: ${ pRunBenchmark.toString() }
-Build Documentation	: ${ pBuildDocumentation.toString() }
-Publish		: ${ pPublish.toString() }
-Silent			: ${ pSilent.toString() }
+	echo """Compiler 	      : ${compiler.cc_name} (${compiler.cpp_cc}/${compiler.cfa_cc})
+Architecture            : ${arch_name}
+Arc Flags               : ${architecture}
+Run All Tests           : ${ pRunAllTests.toString() }
+Run Benchmark           : ${ pRunBenchmark.toString() }
+Build Documentation     : ${ pBuildDocumentation.toString() }
+Publish                 : ${ pPublish.toString() }
+Silent                  : ${ pSilent.toString() }
 """
 
Index: doc/LaTeXmacros/common.tex
===================================================================
--- doc/LaTeXmacros/common.tex	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ doc/LaTeXmacros/common.tex	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -11,6 +11,6 @@
 %% Created On       : Sat Apr  9 10:06:17 2016
 %% Last Modified By : Peter A. Buhr
-%% Last Modified On : Tue Apr 18 17:16:13 2017
-%% Update Count     : 270
+%% Last Modified On : Sun May 14 18:17:09 2017
+%% Update Count     : 295
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -36,6 +36,7 @@
 % Names used in the document.
 
-\newcommand{\CFA}{C$\mathbf\forall$\xspace} % Cforall symbolic name
+\newcommand{\CFA}{C\raisebox{\depth}{\rotatebox{180}{\textscale{1.05}{\textsf{A}}}}\xspace} % Cforall symbolic name
 \newcommand{\CFL}{Cforall\xspace} % Cforall symbolic name
+\newcommand{\Celeven}{C11\xspace} % C11 symbolic name
 \newcommand{\CC}{\rm C\kern-.1em\hbox{+\kern-.25em+}\xspace} % C++ symbolic name
 \newcommand{\CCeleven}{\rm C\kern-.1em\hbox{+\kern-.25em+}11\xspace} % C++11 symbolic name
@@ -43,5 +44,4 @@
 \newcommand{\CCseventeen}{\rm C\kern-.1em\hbox{+\kern-.25em+}17\xspace} % C++17 symbolic name
 \newcommand{\CCtwenty}{\rm C\kern-.1em\hbox{+\kern-.25em+}20\xspace} % C++20 symbolic name
-\newcommand{\Celeven}{C11\xspace} % C11 symbolic name
 \newcommand{\Csharp}{C\raisebox{-0.7ex}{\Large$^\sharp$}\xspace} % C# symbolic name
 
@@ -67,4 +67,5 @@
 \usepackage{pslatex}					% reduce size of san serif font
 \usepackage{relsize}					% must be after change to small or selects old size
+\usepackage{rotating}
 
 % reduce size of chapter/section titles
@@ -97,5 +98,5 @@
 \newcommand{\italic}[1]{\emph{\hyperpage{#1}}}
 \newcommand{\definition}[1]{\textbf{\hyperpage{#1}}}
-\newcommand{\see}[1]{\emph{see} #1}
+\newcommand{\see}[1]{\emph{see}~#1}
 
 % Define some commands that produce formatted index entries suitable for cross-references.
@@ -221,38 +222,5 @@
 }%
 
-% Go programming language: https://github.com/julienc91/listings-golang/blob/master/listings-golang.sty
-\lstdefinelanguage{Golang}{
-	morekeywords=[1]{package,import,func,type,struct,return,defer,panic,recover,select,var,const,iota,},%
-	morekeywords=[2]{string,uint,uint8,uint16,uint32,uint64,int,int8,int16,int32,int64,
-		bool,float32,float64,complex64,complex128,byte,rune,uintptr, error,interface},%
-	morekeywords=[3]{map,slice,make,new,nil,len,cap,copy,close,true,false,delete,append,real,imag,complex,chan,},%
-	morekeywords=[4]{for,break,continue,range,goto,switch,case,fallthrough,if,else,default,},%
-	morekeywords=[5]{Println,Printf,Error,},%
-	sensitive=true,%
-	morecomment=[l]{//},%
-	morecomment=[s]{/*}{*/},%
-	morestring=[b]',%
-	morestring=[b]",%
-	morestring=[s]{`}{`},%
-}
-
-% CFA programming language, based on ANSI C (with some gcc additions)
-\lstdefinelanguage{Pseudo}{
-	morekeywords={string,uint,int,bool,float},%
-	sensitive=true,%
-	morecomment=[l]{//},%
-	morecomment=[s]{/*}{*/},%
-	morestring=[b]',%
-	morestring=[b]",%
-	morestring=[s]{`}{`},%
-}%
-
-% CFA programming language, based on ANSI C (with some gcc additions)
-\lstdefinelanguage{CFA}[ANSI]{C}{
-	morekeywords={_Alignas,_Alignof,__alignof,__alignof__,asm,__asm,__asm__,_At,_Atomic,__attribute,__attribute__,auto,
-		_Bool,catch,catchResume,choose,_Complex,__complex,__complex__,__const,__const__,disable,dtype,enable,__extension__,
-		fallthrough,fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,__label__,lvalue,_Noreturn,one_t,otype,restrict,_Static_assert,
-		_Thread_local,throw,throwResume,trait,try,ttype,typeof,__typeof,__typeof__,zero_t},
-}%
+\usepackage{lstlang}
 
 \newcommand{\CFADefaults}{%
@@ -292,5 +260,4 @@
 {}
 
-
 % Local Variables: %
 % tab-width: 4 %
Index: doc/LaTeXmacros/lstlang.sty
===================================================================
--- doc/LaTeXmacros/lstlang.sty	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
+++ doc/LaTeXmacros/lstlang.sty	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -0,0 +1,120 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+%% 
+%% lstlang.sty -- 
+%% 
+%% Author           : Peter A. Buhr
+%% Created On       : Sat May 13 16:34:42 2017
+%% Last Modified By : Peter A. Buhr
+%% Last Modified On : Sat May 13 16:49:09 2017
+%% Update Count     : 4
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Go programming language: https://github.com/julienc91/listings-golang/blob/master/listings-golang.sty
+\lstdefinelanguage{Golang}{
+	morekeywords=[1]{package,import,func,type,struct,return,defer,panic,recover,select,var,const,iota,},
+	morekeywords=[2]{string,uint,uint8,uint16,uint32,uint64,int,int8,int16,int32,int64,
+		bool,float32,float64,complex64,complex128,byte,rune,uintptr, error,interface},
+	morekeywords=[3]{map,slice,make,new,nil,len,cap,copy,close,true,false,delete,append,real,imag,complex,chan,},
+	morekeywords=[4]{for,break,continue,range,goto,switch,case,fallthrough,if,else,default,},
+	morekeywords=[5]{Println,Printf,Error,},
+	sensitive=true,
+	morecomment=[l]{//},
+	morecomment=[s]{/*}{*/},
+	morestring=[b]',
+	morestring=[b]",
+	morestring=[s]{`}{`},
+}
+
+% from https://gist.github.com/nikolajquorning/92bbbeef32e1dd80105c9bf2daceb89a
+\lstdefinelanguage{sml} {
+	morekeywords= {
+		EQUAL, GREATER, LESS, NONE, SOME, abstraction, abstype, and, andalso, array, as, before, bool,
+		case, char, datatype, do, else, end, eqtype, exception, exn, false, fn, fun, functor, handle,
+		if, in, include, infix, infixr, int, let, list, local, nil, nonfix, not, o, of, op, open,
+		option, orelse, overload, print, raise, real, rec, ref, sharing, sig, signature, string, struct,
+		structure, substring, then, true, type, unit, val, vector, where, while, with, withtype, word
+	},
+	morestring=[b]",
+	morecomment=[s]{(*}{*)},
+}
+
+\lstdefinelanguage{D}{
+	% Keywords
+	morekeywords=[1]{
+		abstract, alias, align, auto, body, break, cast, catch, class, const, continue, debug,
+		delegate, delete, deprecated, do, else, enum, export, false, final, finally, for, foreach,
+		foreach_reverse, function, goto, if, immutable, import, in, inout, interface, invariant, is,
+		lazy, macro, mixin, module, new, nothrow, null, out, override, package, pragma, private,
+		protected, public, pure, ref, return, shared, static, struct, super, switch, synchronized,
+		template, this, throw, true, try, typedef, typeid, typeof, union, unittest, volatile, while,
+		with
+	},
+	% Special identifiers, common functions
+	morekeywords=[2]{enforce},
+	% Ugly identifiers
+	morekeywords=[3]{
+		__DATE__, __EOF__, __FILE__, __LINE__, __TIMESTAMP__, __TIME__, __VENDOR__,
+		__VERSION__, __ctfe, __gshared, __monitor, __thread, __vptr, _argptr,
+		_arguments, _ctor, _dtor
+	},
+	% Basic types
+	morekeywords=[4]{
+		byte, ubyte, short, ushort, int, uint, long, ulong, cent, ucent, void, bool, bit, float,
+		double, real, ushort, int, uint, long, ulong, float, char, wchar, dchar, string, wstring,
+		dstring, ireal, ifloat, idouble, creal, cfloat, cdouble, size_t, ptrdiff_t, sizediff_t,
+		equals_t, hash_t
+	},
+	% Strings
+	morestring=[b]{"},
+	morestring=[b]{'},
+	morestring=[b]{`},
+	% Comments
+	comment=[l]{//},
+	morecomment=[s]{/*}{*/},
+	morecomment=[s][\color{blue}]{/**}{*/},
+	morecomment=[n]{/+}{+/},
+	morecomment=[n][\color{blue}]{/++}{+/},
+	% Options
+	sensitive=true
+}
+
+\lstdefinelanguage{rust}{
+	morekeywords=[1]{
+		abstract, alignof, as, become, box, break, const, continue, crate, do, else, enum, extern,
+        false, final, fn, for, if, impl, in, let, loop, macro, match, mod, move, mut, offsetof,
+        override, priv, proc, pub, pure, ref, return, Self, self, sizeof, static, struct, super,
+        trait, true, type, typeof, unsafe, unsized, use, virtual, where, while, yield
+	},
+	morestring=[b]{"},
+	comment=[l]{//},
+	morecomment=[s]{/*}{*/},
+	sensitive=true
+}
+
+\lstdefinelanguage{Pseudo}{
+	morekeywords={string,uint,int,bool,float},
+	sensitive=true,
+	morecomment=[l]{//},
+	morecomment=[s]{/*}{*/},
+	morestring=[b]',
+	morestring=[b]",
+	morestring=[s]{`}{`},
+}
+
+% CFA programming language, based on ANSI C (with some gcc additions)
+\lstdefinelanguage{CFA}[ANSI]{C}{
+	morekeywords={
+		_Alignas, _Alignof, __alignof, __alignof__, asm, __asm, __asm__, _At, _Atomic, __attribute,
+		__attribute__, auto, _Bool, catch, catchResume, choose, _Complex, __complex, __complex__,
+		__const, __const__, coroutine, disable, dtype, enable, __extension__, fallthrough, fallthru,
+		finally, forall, ftype, _Generic, _Imaginary, inline, __label__, lvalue, monitor, mutex,
+		_Noreturn, one_t, otype, restrict, _Static_assert, thread, _Thread_local, throw, throwResume,
+		trait, try, ttype, typeof, __typeof, __typeof__, zero_t},
+}
+
+% Local Variables: %
+% tab-width: 4 %
+% fill-column: 100 %
+% End: %
Index: doc/generic_types/generic_types.tex
===================================================================
--- doc/generic_types/generic_types.tex	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ doc/generic_types/generic_types.tex	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -6,4 +6,5 @@
 \usepackage{upquote}									% switch curled `'" to straight
 \usepackage{listings}									% format program code
+\usepackage{rotating}
 \usepackage[usenames]{color}
 
@@ -48,5 +49,6 @@
 
 % Useful macros
-\newcommand{\CFA}{C$\mathbf\forall$\xspace} % Cforall symbolic name
+\newcommand{\CFA}{C\raisebox{\depth}{\rotatebox{180}{\textsf{A}}}\hspace{-1pt}\xspace} % Cforall symbolic name
+%\newcommand{\CFA}{C$\mathbf\forall$\xspace} % Cforall symbolic name
 \newcommand{\CC}{\rm C\kern-.1em\hbox{+\kern-.25em+}\xspace} % C++ symbolic name
 \newcommand{\CCeleven}{\rm C\kern-.1em\hbox{+\kern-.25em+}11\xspace} % C++11 symbolic name
@@ -97,5 +99,5 @@
 \acmJournal{PACMPL}
 
-\title{Generic and Tuple Types with Efficient Dynamic Layout in \CFA}
+\title{Generic and Tuple Types with Efficient Dynamic Layout in \protect\CFA}
 
 \author{Aaron Moss}
@@ -197,5 +199,5 @@
 \label{sec:poly-fns}
 
-\CFA's polymorphism was originally formalized by \citet{Ditchfield92}, and first implemented by \citet{Bilson03}.
+\CFA{}\hspace{1pt}'s polymorphism was originally formalized by \citet{Ditchfield92}, and first implemented by \citet{Bilson03}.
 The signature feature of \CFA is parametric-polymorphic functions~\citep{forceone:impl,Cormack90,Duggan96} with functions generalized using a @forall@ clause (giving the language its name):
 \begin{lstlisting}
@@ -950,5 +952,5 @@
 }
 \end{lstlisting}
-\caption{\CFA Benchmark Test}
+\caption{\protect\CFA Benchmark Test}
 \label{fig:BenchmarkTest}
 \end{figure}
@@ -1020,5 +1022,5 @@
 While \CC provides good backwards compatibility with C, it has a steep learning curve for many of its extensions.
 For example, polymorphism is provided via three disjoint mechanisms: overloading, inheritance, and templates.
-The overloading is restricted because resolution does not using the return type, inheritance requires learning object-oriented programming and coping with a restricted nominal-inheritance hierarchy, templates cannot be separately compiled resulting in compilation/code bloat and poor error messages, and determining how these mechanisms interact and which to use is confusing.
+The overloading is restricted because resolution does not use the return type, inheritance requires learning object-oriented programming and coping with a restricted nominal-inheritance hierarchy, templates cannot be separately compiled resulting in compilation/code bloat and poor error messages, and determining how these mechanisms interact and which to use is confusing.
 In contrast, \CFA has a single facility for polymorphic code supporting type-safe separate-compilation of polymorphic functions and generic (opaque) types, which uniformly leverage the C procedural paradigm.
 The key mechanism to support separate compilation is \CFA's \emph{explicit} use of assumed properties for a type.
Index: doc/user/Makefile
===================================================================
--- doc/user/Makefile	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ doc/user/Makefile	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -47,5 +47,5 @@
 
 ${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex \
-		../LaTeXmacros/common.tex ../LaTeXmacros/indexstyle ../bibliography/cfa.bib
+		../LaTeXmacros/common.tex ../LaTeXmacros/lstlang.sty ../LaTeXmacros/indexstyle ../bibliography/cfa.bib
 	# Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
 	if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi
Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/CodeGen/CodeGenerator.cc	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -10,5 +10,5 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Tus May  9 16:50:00 2017
+// Last Modified On : Wed May 10 14:45:00 2017
 // Update Count     : 484
 //
@@ -41,17 +41,4 @@
 namespace CodeGen {
 	int CodeGenerator::tabsize = 4;
-
-	// Pseudo Function: output << lineDirective(currentNode);
-    struct lineDirective {
-        CodeLocation const & loc;
-		lineDirective(CodeLocation const & location) : loc(location) {}
-		lineDirective(BaseSyntaxNode const * node) : loc(node->location) {}
-	};
-	std::ostream & operator<<(std::ostream & out, lineDirective const & ld) {
-		if (ld.loc.isSet())
-			return out << "\n# " << ld.loc.linenumber << " \""
-				<< ld.loc.filename << "\"\n";
-		return out << "\n// Unset Location\n";
-	}
 
 	// the kinds of statements that would ideally be followed by whitespace
@@ -102,5 +89,27 @@
 	}
 
-	CodeGenerator::CodeGenerator( std::ostream & os, bool pretty, bool genC ) : indent( *this), cur_indent( 0 ), insideFunction( false ), output( os ), printLabels( *this ), pretty( pretty ), genC( genC ) {}
+	CodeGenerator::LineMarker::LineMarker(
+			CodeLocation const & loc, bool toPrint) :
+		loc(loc), toPrint(toPrint)
+	{}
+
+	CodeGenerator::LineMarker CodeGenerator::lineDirective(
+			BaseSyntaxNode const * node) {
+		return LineMarker(node->location, lineMarks);
+	}
+
+	std::ostream & operator<<(std::ostream & out,
+			CodeGenerator::LineMarker const & marker) {
+		if (marker.toPrint && marker.loc.isSet()) {
+			return out << "\n# " << marker.loc.linenumber << " \""
+				<< marker.loc.filename << "\"\n";
+		} else if (marker.toPrint) {
+			return out << "\n/* Missing CodeLocation */\n";
+		} else {
+        	return out;
+		}
+	}
+
+	CodeGenerator::CodeGenerator( std::ostream & os, bool pretty, bool genC, bool lineMarks ) : indent( *this), cur_indent( 0 ), insideFunction( false ), output( os ), printLabels( *this ), pretty( pretty ), genC( genC ), lineMarks( lineMarks ) {}
 
 	CodeGenerator::CodeGenerator( std::ostream & os, std::string init, int indentation, bool infunp )
@@ -143,6 +152,4 @@
 	// *** Declarations
 	void CodeGenerator::visit( FunctionDecl * functionDecl ) {
-		output << lineDirective( functionDecl );
-
 		extension( functionDecl );
 		genAttributes( functionDecl->get_attributes() );
@@ -168,6 +175,4 @@
 		}
 
-		output << lineDirective( objectDecl );
-
 		extension( objectDecl );
 		genAttributes( objectDecl->get_attributes() );
@@ -221,6 +226,4 @@
 
 	void CodeGenerator::visit( StructDecl * structDecl ) {
-		output << lineDirective( structDecl );
-
 		extension( structDecl );
 		handleAggregate( structDecl, "struct " );
@@ -228,6 +231,4 @@
 
 	void CodeGenerator::visit( UnionDecl * unionDecl ) {
-		output << lineDirective( unionDecl );
-
 		extension( unionDecl );
 		handleAggregate( unionDecl, "union " );
@@ -708,4 +709,5 @@
 	void CodeGenerator::visit( UntypedTupleExpr * tupleExpr ) {
 		assertf( ! genC, "UntypedTupleExpr should not reach code generation." );
+		extension( tupleExpr );
 		output << "[";
 		genCommaList( tupleExpr->get_exprs().begin(), tupleExpr->get_exprs().end() );
@@ -715,7 +717,15 @@
 	void CodeGenerator::visit( TupleExpr * tupleExpr ) {
 		assertf( ! genC, "TupleExpr should not reach code generation." );
+		extension( tupleExpr );
 		output << "[";
 		genCommaList( tupleExpr->get_exprs().begin(), tupleExpr->get_exprs().end() );
 		output << "]";
+	}
+
+	void CodeGenerator::visit( TupleIndexExpr * tupleExpr ) {
+		assertf( ! genC, "TupleIndexExpr should not reach code generation." );
+		extension( tupleExpr );
+		tupleExpr->get_tuple()->accept( *this );
+		output << "." << tupleExpr->get_index();
 	}
 
Index: src/CodeGen/CodeGenerator.h
===================================================================
--- src/CodeGen/CodeGenerator.h	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/CodeGen/CodeGenerator.h	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -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 : Wed Mar  1 16:20:04 2017
-// Update Count     : 50
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed May 10 10:57:00 2017
+// Update Count     : 51
 //
 
@@ -25,4 +25,6 @@
 #include "SymTab/Indexer.h"
 
+#include "Common/utility.h"
+
 namespace CodeGen {
 	class CodeGenerator : public Visitor {
@@ -30,5 +32,5 @@
 		static int tabsize;
 
-		CodeGenerator( std::ostream &os, bool pretty = false, bool genC = false );
+		CodeGenerator( std::ostream &os, bool pretty = false, bool genC = false, bool lineMarks = false );
 		CodeGenerator( std::ostream &os, std::string, int indent = 0, bool infun = false );
 		CodeGenerator( std::ostream &os, char *, int indent = 0, bool infun = false );
@@ -74,4 +76,5 @@
 		virtual void visit( UntypedTupleExpr *tupleExpr );
 		virtual void visit( TupleExpr *tupleExpr );
+		virtual void visit( TupleIndexExpr * tupleExpr );
 		virtual void visit( TypeExpr *typeExpr );
 		virtual void visit( AsmExpr * );
@@ -110,4 +113,13 @@
 		};
 
+		struct LineMarker {
+			CodeLocation const & loc;
+			bool toPrint;
+
+			LineMarker(CodeLocation const & loc, bool toPrint);
+		};
+
+		LineMarker lineDirective(BaseSyntaxNode const * node);
+
 		void asmName( DeclarationWithType *decl );
 
@@ -122,4 +134,5 @@
 		bool pretty = false;  // pretty print
 		bool genC = false;    // true if output has to be C code
+		bool lineMarks = false;
 
 		void printDesignators( std::list< Expression * > & );
@@ -149,4 +162,7 @@
 	/// returns C-compatible name of declaration
 	std::string genName( DeclarationWithType * decl );
+
+	std::ostream & operator<<(std::ostream &,
+		CodeGenerator::LineMarker const &);
 } // namespace CodeGen
 
Index: src/CodeGen/GenType.cc
===================================================================
--- src/CodeGen/GenType.cc	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/CodeGen/GenType.cc	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -28,5 +28,5 @@
 	class GenType : public Visitor {
 	  public:
-		GenType( const std::string &typeString, bool pretty = false, bool genC = false );
+		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; }
@@ -54,12 +54,13 @@
 		bool pretty = false; // pretty print
 		bool genC = false;   // generating C code?
+		bool lineMarks = false;
 	};
 
-	std::string genType( Type *type, const std::string &baseString, bool pretty, bool genC ) {
-		GenType gt( baseString, pretty, genC );
+	std::string genType( Type *type, const std::string &baseString, bool pretty, bool genC , bool lineMarks ) {
+		GenType gt( baseString, pretty, genC, lineMarks );
 		std::ostringstream os;
 
 		if ( ! type->get_attributes().empty() ) {
-			CodeGenerator cg( os, pretty, genC );
+			CodeGenerator cg( os, pretty, genC, lineMarks );
 			cg.genAttributes( type->get_attributes() );
 		} // if
@@ -73,5 +74,5 @@
   }
 
-	GenType::GenType( const std::string &typeString, bool pretty, bool genC ) : typeString( typeString ), pretty( pretty ), genC( genC ) {}
+	GenType::GenType( const std::string &typeString, bool pretty, bool genC, bool lineMarks ) : typeString( typeString ), pretty( pretty ), genC( genC ), lineMarks( lineMarks ) {}
 
 	void GenType::visit( VoidType *voidType ) {
@@ -114,5 +115,5 @@
 		} // if
 		if ( dimension != 0 ) {
-			CodeGenerator cg( os, pretty, genC );
+			CodeGenerator cg( os, pretty, genC, lineMarks );
 			dimension->accept( cg );
 		} else if ( isVarLen ) {
@@ -168,5 +169,5 @@
 			} // if
 		} else {
-			CodeGenerator cg( os, pretty, genC );
+			CodeGenerator cg( os, pretty, genC, lineMarks );
 			os << "(" ;
 
@@ -191,5 +192,5 @@
 			// assertf( ! genC, "Aggregate type parameters should not reach code generation." );
 			std::ostringstream os;
-			CodeGenerator cg( os, pretty, genC );
+			CodeGenerator cg( os, pretty, genC, lineMarks );
 			os << "forall(";
 			cg.genCommaList( funcType->get_forall().begin(), funcType->get_forall().end() );
@@ -202,5 +203,5 @@
 		if ( ! refType->get_parameters().empty() ) {
 			std::ostringstream os;
-			CodeGenerator cg( os, pretty, genC );
+			CodeGenerator cg( os, pretty, genC, lineMarks );
 			os << "(";
 			cg.genCommaList( refType->get_parameters().begin(), refType->get_parameters().end() );
@@ -242,5 +243,5 @@
 		for ( Type * t : *tupleType ) {
 			i++;
-			os << genType( t, "", pretty, genC ) << (i == tupleType->size() ? "" : ", ");
+			os << genType( t, "", pretty, genC, lineMarks ) << (i == tupleType->size() ? "" : ", ");
 		}
 		os << "]";
Index: src/CodeGen/GenType.h
===================================================================
--- src/CodeGen/GenType.h	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/CodeGen/GenType.h	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -21,5 +21,5 @@
 
 namespace CodeGen {
-	std::string genType( Type *type, const std::string &baseString, bool pretty = false, bool genC = false );
+	std::string genType( Type *type, const std::string &baseString, bool pretty = false, bool genC = false, bool lineMarks = false );
   std::string genPrettyType( Type * type, const std::string & baseString );
 } // namespace CodeGen
Index: src/CodeGen/Generate.cc
===================================================================
--- src/CodeGen/Generate.cc	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/CodeGen/Generate.cc	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -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 : Thu Jun  4 14:04:25 2015
-// Update Count     : 5
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed May 19 13:05:00 2017
+// Update Count     : 6
 //
 
@@ -31,8 +31,9 @@
 
 namespace CodeGen {
-	void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics, bool pretty, bool generateC ) {
-		CodeGen::CodeGenerator cgv( os, pretty, generateC );
+	void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics, bool pretty, bool generateC, bool lineMarks ) {
+		CodeGen::CodeGenerator cgv( os, pretty, generateC, lineMarks );
 		for ( auto & dcl : translationUnit ) {
 			if ( LinkageSpec::isGeneratable( dcl->get_linkage() ) && (doIntrinsics || ! LinkageSpec::isBuiltin( dcl->get_linkage() ) ) ) {
+				os << cgv.lineDirective(dcl);
 				dcl->accept(cgv);
 				if ( doSemicolon( dcl ) ) {
@@ -48,5 +49,5 @@
 			os << CodeGen::genPrettyType( type, "" );
 		} else {
-			CodeGen::CodeGenerator cgv( os, true, false );
+			CodeGen::CodeGenerator cgv( os, true, false, false );
 			node->accept( cgv );
 		}
Index: src/CodeGen/Generate.h
===================================================================
--- src/CodeGen/Generate.h	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/CodeGen/Generate.h	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -24,5 +24,5 @@
 namespace CodeGen {
 	/// Generates code. doIntrinsics determines if intrinsic functions are printed, pretty formats output nicely (e.g., uses unmangled names, etc.), generateC is true when the output must consist only of C code (allows some assertions, etc.)
-	void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics, bool pretty, bool generateC = false );
+	void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics, bool pretty, bool generateC = false , bool lineMarks = false );
 
 	/// Generate code for a single node -- helpful for debugging in gdb
Index: c/CodeGen/LineStream.cc
===================================================================
--- src/CodeGen/LineStream.cc	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ 	(revision )
@@ -1,97 +1,0 @@
-//
-// 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.
-//
-// LineStream.cc -- Modified stream that inserts line directives into output.
-//
-// Author           : Andrew Beach
-// Created On       : Thr May 4 13:15:00 2017
-// Last Modified By : Andrew Beach
-// Last Modified On : Mon May 8 12:08:00 2017
-// Update Count     : 0
-//
-
-#include "LineStream.h"
-
-namespace CodeGen {
-
-	void LineStream::printLineDirective(CodeLocation const & location) {
-		baseStream << "\n# " << location.linenumber;
-		if (std::string("") != location.filename) {
-			baseStream << " \"" << location.filename  << '"';
-		}
-		baseStream << '\n';
-	}
-
-	bool LineStream::actualDiffersFromExpected() const {
-		return actualLocation.isSet() &&
-			// actualLocation & expectedLocation must match at the line.
-			(actualLocation.linenumber != expectedLocation.linenumber ||
-			 actualLocation.filename != expectedLocation.filename);
-	}
-
-	void LineStream::emptyBuffer(bool addNewline) {
-		if (actualDiffersFromExpected()) {
-			printLineDirective(actualLocation);
-			expectedLocation = actualLocation;
-		}
-		actualLocation.unset();
-
-		if (addNewline) {
-			expectedLocation.linenumber += 1;
-			buffer.put('\n');
-		}
-
-		baseStream << buffer.str() << std::flush;
-		buffer.str("");
-	}
-
-	void LineStream::setLoc(CodeLocation const & location) {
-		if (insertLines) {
-			if (expectedLocation.isUnset()) {
-				expectedLocation = actualLocation = location;
-			} else if (actualLocation.isUnset()) {
-				actualLocation = location;
-			} else if (actualLocation.filename != location.filename) {
-				emptyBuffer(true);
-				actualLocation = location;
-			} else if (location.linenumber <= actualLocation.linenumber){
-				actualLocation.linenumber = location.linenumber;
-			}
-		}
-	}
-
-	LineStream & LineStream::operator<<(char const * str) {
-		buffer << str;
-		return *this;
-	}
-
-	LineStream & LineStream::operator<<(std::string const & str) {
-		buffer << str;
-		return *this;
-	}
-
-	LineStream & LineStream::operator<<(StreamFlag flag) {
-		static StreamFlag const endlCopy = std::endl;
-		if (!insertLines) {
-			baseStream << flag;
-		} else if (endlCopy == flag) {
-			emptyBuffer(true);
-		} else {
-			buffer << flag;
-		}
-		return *this;
-	}
-
-	LineStream & LineStream::flush() {
-		if (insertLines) {
-			emptyBuffer(false);
-		} else {
-			baseStream.flush();
-		}
-		return *this;
-	}
-
-} // CodeGen
Index: c/CodeGen/LineStream.h
===================================================================
--- src/CodeGen/LineStream.h	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ 	(revision )
@@ -1,62 +1,0 @@
-//
-// 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.
-//
-// LineStream.h -- Modified stream that inserts line directives into output.
-//
-// Author           : Andrew Beach
-// Created On       : Wed May 4 09:15:00 2017
-// Last Modified By : Andrew Beach
-// Last Modified On : Mon May 8 14:03:00 2017
-// Update Count     : 1
-//
-
-#ifndef LINE_STREAM_H
-#define LINE_STREAM_H
-
-#include <ostream>
-#include <sstream>
-#include <string>
-
-#include "Common/utility.h"
-
-namespace CodeGen {
-
-	class LineStream {
-		std::ostream & baseStream;
-		std::ostringstream buffer;
-
-		bool const insertLines;
-
-		CodeLocation actualLocation;
-		CodeLocation expectedLocation;
-
-		void printLineDirective(CodeLocation const & location);
-		bool actualDiffersFromExpected() const;
-		void emptyBuffer(bool addNewline);
-
-	public:
-		typedef std::ostream &(*StreamFlag)(std::ostream &);
-
-		LineStream(std::ostream & baseStream, bool insertLines) :
-			baseStream(baseStream), insertLines(insertLines)
-		{}
-
-		/// Update the currentLocation in source code.
-		void setLoc(CodeLocation const & location);
-
-		/// Formated output is buffered until flushed.
-		LineStream & operator<<(char const *str);
-		LineStream & operator<<(std::string const & str);
-		LineStream & operator<<(StreamFlag flag);
-
-		/// Flush all buffered output.
-		LineStream & flush();
-
-	}; // LineStream
-
-} // CodeGen
-
-#endif // LINE_STREAM_H
Index: src/Common/utility.h
===================================================================
--- src/Common/utility.h	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/Common/utility.h	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -322,5 +322,5 @@
 	std::string filename;
 
-    /// Create a new unset CodeLocation.
+	/// Create a new unset CodeLocation.
 	CodeLocation()
 		: linenumber( -1 )
@@ -328,5 +328,5 @@
 	{}
 
-    /// Create a new CodeLocation with the given values.
+	/// Create a new CodeLocation with the given values.
 	CodeLocation( const char* filename, int lineno )
 		: linenumber( lineno )
@@ -334,11 +334,11 @@
 	{}
 
-    bool isSet () const {
-        return -1 != linenumber;
-    }
-
-    bool isUnset () const {
-        return !isSet();
-    }
+	bool isSet () const {
+		return -1 != linenumber;
+	}
+
+	bool isUnset () const {
+		return !isSet();
+	}
 
 	void unset () {
@@ -353,4 +353,5 @@
 	return location.isSet() ? location.filename + ":" + std::to_string(location.linenumber) + " " : "";
 }
+
 #endif // _UTILITY_H
 
Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/GenPoly/Box.cc	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Mar 17 09:06:37 2017
-// Update Count     : 339
+// Last Modified On : Sat May 13 09:26:38 2017
+// Update Count     : 341
 //
 
@@ -706,7 +706,8 @@
 				Type *concrete = env->lookup( typeInst->get_name() );
 				if ( concrete == 0 ) {
+					return typeInst;
 					// xxx - should this be an assertion?
-					std::string x = env ? toString( *env ) : "missing env";
-					throw SemanticError( x + "\n" + "Unbound type variable " + typeInst->get_name() + " in ", appExpr );
+//					std::string x = env ? toString( *env ) : "missing env";
+//					throw SemanticError( x + "\n" + "Unbound type variable " + typeInst->get_name() + " in ", appExpr );
 				} // if
 				return concrete;
@@ -764,4 +765,8 @@
 					} else {
 						arg = new AddressExpr( arg );
+					}
+					if ( ! ResolvExpr::typesCompatible( param, arg->get_result(), SymTab::Indexer() ) ) {
+						// silence warnings by casting boxed parameters when the actual type does not match up with the formal type.
+						arg = new CastExpr( arg, param->clone() );
 					}
 				} else {
@@ -902,6 +907,5 @@
 				} // if
 				UntypedExpr *assign = new UntypedExpr( new NameExpr( "?=?" ) );
-				UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
-				deref->get_args().push_back( new CastExpr( new VariableExpr( *param++ ), new PointerType( Type::Qualifiers(), realType->get_returnVals().front()->get_type()->clone() ) ) );
+				UntypedExpr *deref = UntypedExpr::createDeref( new CastExpr( new VariableExpr( *param++ ), new PointerType( Type::Qualifiers(), realType->get_returnVals().front()->get_type()->clone() ) ) );
 				assign->get_args().push_back( deref );
 				addAdapterParams( adapteeApp, arg, param, adapterType->get_parameters().end(), realParam, tyVars );
@@ -1217,11 +1221,4 @@
 
 		Statement * Pass1::mutate( ReturnStmt *returnStmt ) {
-			// maybe need access to the env when mutating the expr
-			if ( Expression * expr = returnStmt->get_expr() ) {
-				if ( expr->get_env() ) {
-					env = expr->get_env();
-				}
-			}
-
 			if ( retval && returnStmt->get_expr() ) {
 				assert( returnStmt->get_expr()->has_result() && ! returnStmt->get_expr()->get_result()->isVoid() );
@@ -1302,5 +1299,5 @@
 			FunctionType * ftype = functionDecl->get_functionType();
 			if ( ! ftype->get_returnVals().empty() && functionDecl->get_statements() ) {
-				if ( functionDecl->get_name() != "?=?" && ! isPrefix( functionDecl->get_name(), "_thunk" ) && ! isPrefix( functionDecl->get_name(), "_adapter" ) ) { // xxx - remove check for ?=? once reference types are in; remove check for prefix once thunks properly use ctor/dtors
+				if ( ! isPrefix( functionDecl->get_name(), "_thunk" ) && ! isPrefix( functionDecl->get_name(), "_adapter" ) ) { // xxx - remove check for prefix once thunks properly use ctor/dtors
 					assert( ftype->get_returnVals().size() == 1 );
 					DeclarationWithType * retval = ftype->get_returnVals().front();
@@ -1539,6 +1536,6 @@
 					Type *declType = objectDecl->get_type();
 					std::string bufName = bufNamer.newName();
-					ObjectDecl *newBuf = new ObjectDecl( bufName, Type::StorageClasses(), LinkageSpec::C, 0, 
-						new ArrayType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::Kind::Char), new NameExpr( sizeofName( mangleType(declType) ) ), 
+					ObjectDecl *newBuf = new ObjectDecl( bufName, Type::StorageClasses(), LinkageSpec::C, 0,
+						new ArrayType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::Kind::Char), new NameExpr( sizeofName( mangleType(declType) ) ),
 						true, false, std::list<Attribute*>{ new Attribute( std::string{"aligned"}, std::list<Expression*>{ new ConstantExpr( Constant::from_int(8) ) } ) } ), 0 );
 					stmtsToAdd.push_back( new DeclStmt( noLabels, newBuf ) );
@@ -1578,15 +1575,4 @@
 		}
 
-		/// Returns an expression dereferenced n times
-		Expression *makeDerefdVar( Expression *derefdVar, long n ) {
-			for ( int i = 1; i < n; ++i ) {
-				UntypedExpr *derefExpr = new UntypedExpr( new NameExpr( "*?" ) );
-				derefExpr->get_args().push_back( derefdVar );
-				// xxx - should set results on derefExpr
-				derefdVar = derefExpr;
-			}
-			return derefdVar;
-		}
-
 		Expression *PolyGenericCalculator::mutate( MemberExpr *memberExpr ) {
 			// mutate, exiting early if no longer MemberExpr
@@ -1595,14 +1581,7 @@
 			if ( ! memberExpr ) return expr;
 
-			// get declaration for base struct, exiting early if not found
-			int varDepth;
-			VariableExpr *varExpr = getBaseVar( memberExpr->get_aggregate(), &varDepth );
-			if ( ! varExpr ) return memberExpr;
-			ObjectDecl *objectDecl = dynamic_cast< ObjectDecl* >( varExpr->get_var() );
-			if ( ! objectDecl ) return memberExpr;
-
 			// only mutate member expressions for polymorphic types
 			int tyDepth;
-			Type *objectType = hasPolyBase( objectDecl->get_type(), scopeTyVars, &tyDepth );
+			Type *objectType = hasPolyBase( memberExpr->get_aggregate()->get_result(), scopeTyVars, &tyDepth );
 			if ( ! objectType ) return memberExpr;
 			findGeneric( objectType ); // ensure layout for this type is available
@@ -1622,8 +1601,13 @@
 				fieldLoc->get_args().push_back( aggr );
 				fieldLoc->get_args().push_back( makeOffsetIndex( objectType, i ) );
+				fieldLoc->set_result( memberExpr->get_result()->clone() );
 				newMemberExpr = fieldLoc;
 			} else if ( dynamic_cast< UnionInstType* >( objectType ) ) {
-				// union members are all at offset zero, so build appropriately-dereferenced variable
-				newMemberExpr = makeDerefdVar( varExpr->clone(), varDepth );
+				// union members are all at offset zero, so just use the aggregate expr
+				Expression * aggr = memberExpr->get_aggregate()->clone();
+				delete aggr->get_env(); // xxx - there's a problem with keeping the env for some reason, so for now just get rid of it
+				aggr->set_env( nullptr );
+				newMemberExpr = aggr;
+				newMemberExpr->set_result( memberExpr->get_result()->clone() );
 			} else return memberExpr;
 			assert( newMemberExpr );
@@ -1633,6 +1617,5 @@
 				// Not all members of a polymorphic type are themselves of polymorphic type; in this case the member expression should be wrapped and dereferenced to form an lvalue
 				CastExpr *ptrCastExpr = new CastExpr( newMemberExpr, new PointerType( Type::Qualifiers(), memberType->clone() ) );
-				UntypedExpr *derefExpr = new UntypedExpr( new NameExpr( "*?" ) );
-				derefExpr->get_args().push_back( ptrCastExpr );
+				UntypedExpr *derefExpr = UntypedExpr::createDeref( ptrCastExpr );
 				newMemberExpr = derefExpr;
 			}
Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/InitTweak/FixInit.cc	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -361,5 +361,5 @@
 					FunctionType * ftype = dynamic_cast< FunctionType * >( GenPoly::getFunctionType( funcDecl->get_type() ) );
 					assert( ftype );
-					if ( (isConstructor( funcDecl->get_name() ) || funcDecl->get_name() == "?=?") && ftype->get_parameters().size() == 2 ) {
+					if ( isConstructor( funcDecl->get_name() ) && ftype->get_parameters().size() == 2 ) {
 						Type * t1 = ftype->get_parameters().front()->get_type();
 						Type * t2 = ftype->get_parameters().back()->get_type();
@@ -367,6 +367,5 @@
 
 						if ( ResolvExpr::typesCompatible( ptrType->get_base(), t2, SymTab::Indexer() ) ) {
-							// optimization: don't need to copy construct in order to call a copy constructor or
-							// assignment operator
+							// optimization: don't need to copy construct in order to call a copy constructor
 							return appExpr;
 						} // if
@@ -636,7 +635,9 @@
 				assert( ! stmtExpr->get_returnDecls().empty() );
 				body->get_kids().push_back( new ExprStmt( noLabels, new VariableExpr( stmtExpr->get_returnDecls().front() ) ) );
-			}
-			stmtExpr->get_returnDecls().clear();
-			stmtExpr->get_dtors().clear();
+				stmtExpr->get_returnDecls().clear();
+				stmtExpr->get_dtors().clear();
+			}
+			assert( stmtExpr->get_returnDecls().empty() );
+			assert( stmtExpr->get_dtors().empty() );
 			return stmtExpr;
 		}
@@ -655,5 +656,5 @@
 				unqExpr->set_result( maybeClone( unqExpr->get_expr()->get_result() ) );
 				if ( unqCount[ unqExpr->get_id() ] == 0 ) {  // insert destructor after the last use of the unique expression
-					stmtsToAdd.splice( stmtsToAddAfter.end(), dtors[ unqExpr->get_id() ] );
+					stmtsToAddAfter.splice( stmtsToAddAfter.end(), dtors[ unqExpr->get_id() ] );
 				}
 				if ( addDeref.count( unqExpr->get_id() ) ) {
@@ -667,4 +668,9 @@
 			stmtsToAdd.splice( stmtsToAdd.end(), fixer.stmtsToAdd );
 			unqMap[unqExpr->get_id()] = unqExpr;
+			if ( unqCount[ unqExpr->get_id() ] == 0 ) {  // insert destructor after the last use of the unique expression
+				stmtsToAddAfter.splice( stmtsToAddAfter.end(), dtors[ unqExpr->get_id() ] );
+			} else { // remember dtors for last instance of unique expr
+				dtors[ unqExpr->get_id() ] = fixer.stmtsToAddAfter;
+			}
 			if ( UntypedExpr * deref = dynamic_cast< UntypedExpr * >( unqExpr->get_expr() ) ) {
 				// unique expression is now a dereference, because the inner expression is an lvalue returning function call.
@@ -675,9 +681,4 @@
 				getCallArg( deref, 0 ) = unqExpr;
 				addDeref.insert( unqExpr->get_id() );
-				if ( unqCount[ unqExpr->get_id() ] == 0 ) {  // insert destructor after the last use of the unique expression
-					stmtsToAdd.splice( stmtsToAddAfter.end(), dtors[ unqExpr->get_id() ] );
-				} else { // remember dtors for last instance of unique expr
-					dtors[ unqExpr->get_id() ] = fixer.stmtsToAddAfter;
-				}
 				return deref;
 			}
Index: src/InitTweak/GenInit.cc
===================================================================
--- src/InitTweak/GenInit.cc	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/InitTweak/GenInit.cc	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -142,6 +142,5 @@
 		// hands off if the function returns an lvalue - we don't want to allocate a temporary if a variable's address
 		// is being returned
-		// Note: under the assumption that assignments return *this, checking for ?=? here is an optimization, since it shouldn't be necessary to copy construct `this`. This is a temporary optimization until reference types are added, at which point this should be removed, along with the analogous optimization in copy constructor generation.
-		if ( returnStmt->get_expr() && returnVals.size() == 1 && funcName != "?=?" && ! returnVals.front()->get_type()->get_lvalue() ) {
+		if ( returnStmt->get_expr() && returnVals.size() == 1 && ! returnVals.front()->get_type()->get_lvalue() ) {
 			// explicitly construct the return value using the return expression and the retVal object
 			assertf( returnVals.front()->get_name() != "", "Function %s has unnamed return value\n", funcName.c_str() );
Index: src/libcfa/Makefile.am
===================================================================
--- src/libcfa/Makefile.am	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/libcfa/Makefile.am	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -11,6 +11,6 @@
 ## Created On       : Sun May 31 08:54:01 2015
 ## Last Modified By : Peter A. Buhr
-## Last Modified On : Sat Mar 25 18:00:10 2017
-## Update Count     : 212
+## Last Modified On : Sun May 14 21:04:21 2017
+## Update Count     : 214
 ###############################################################################
 
@@ -76,5 +76,5 @@
 
 cfa_includedir = $(CFA_INCDIR)
-nobase_cfa_include_HEADERS = ${headers} ${stdhdr} concurrency/invoke.h
+nobase_cfa_include_HEADERS = ${headers} ${stdhdr} gmp concurrency/invoke.h
 
 CLEANFILES = libcfa-prelude.c
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/libcfa/Makefile.in	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -183,5 +183,5 @@
 	containers/vector concurrency/coroutine concurrency/thread \
 	concurrency/kernel concurrency/monitor ${shell echo stdhdr/*} \
-	concurrency/invoke.h
+	gmp concurrency/invoke.h
 HEADERS = $(nobase_cfa_include_HEADERS)
 ETAGS = etags
@@ -324,5 +324,5 @@
 stdhdr = ${shell echo stdhdr/*}
 cfa_includedir = $(CFA_INCDIR)
-nobase_cfa_include_HEADERS = ${headers} ${stdhdr} concurrency/invoke.h
+nobase_cfa_include_HEADERS = ${headers} ${stdhdr} gmp concurrency/invoke.h
 CLEANFILES = libcfa-prelude.c
 all: all-am
Index: src/libcfa/gmp
===================================================================
--- src/libcfa/gmp	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
+++ src/libcfa/gmp	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -0,0 +1,269 @@
+// 
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+// 
+// gmp -- 
+// 
+// Author           : Peter A. Buhr
+// Created On       : Tue Apr 19 08:43:43 2016
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Sat May 13 22:52:26 2017
+// Update Count     : 8
+// 
+
+extern "C" {
+// https://gmplib.org/gmp-man-6.1.1.pdf
+#include <gmp.h>										// GNU multi-precise integers
+// some code for operators "/" and "%" taken from g++ gmpxx.h
+}
+#include <fstream>										// sout
+
+struct Int { mpz_t mpz; };								// wrap GMP implementation
+
+// constructor
+void ?{}( Int * this ) { mpz_init( this->mpz ); }
+void ?{}( Int * this, Int init ) { mpz_init_set( this->mpz, init.mpz ); }
+void ?{}( Int * this, zero_t ) { mpz_init_set_si( this->mpz, 0 ); }
+void ?{}( Int * this, one_t ) { mpz_init_set_si( this->mpz, 1 ); }
+void ?{}( Int * this, signed long int init ) { mpz_init_set_si( this->mpz, init ); }
+void ?{}( Int * this, unsigned long int init ) { mpz_init_set_ui( this->mpz, init ); }
+void ?{}( Int * this, const char * val ) { if ( mpz_init_set_str( this->mpz, val, 0 ) ) abort(); }
+void ^?{}( Int * this ) { mpz_clear( this->mpz ); }
+
+// assignment
+Int ?=?( Int * lhs, Int rhs ) { mpz_set( lhs->mpz, rhs.mpz ); return *lhs; }
+Int ?=?( Int * lhs, long int rhs ) { mpz_set_si( lhs->mpz, rhs ); return *lhs; }
+Int ?=?( Int * lhs, unsigned long int rhs ) { mpz_set_ui( lhs->mpz, rhs ); return *lhs; }
+//Int ?=?( Int * lhs, const char * rhs ) { if ( mpq_set_str( lhs->mpz, rhs, 0 ) ) abort(); return *lhs; }
+
+char ?=?( char * lhs, Int rhs ) { char val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
+short int ?=?( short int * lhs, Int rhs ) { short int val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
+int ?=?( int * lhs, Int rhs ) { int val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
+long int ?=?( long int * lhs, Int rhs ) { long int val = mpz_get_si( rhs.mpz ); *lhs = val; return val; }
+unsigned char ?=?( unsigned char * lhs, Int rhs ) { unsigned char val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
+unsigned short int ?=?( unsigned short int * lhs, Int rhs ) { unsigned short int val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
+unsigned int ?=?( unsigned int * lhs, Int rhs ) { unsigned int val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
+unsigned long int ?=?( unsigned long int * lhs, Int rhs ) { unsigned long int val = mpz_get_ui( rhs.mpz ); *lhs = val; return val; }
+
+// conversions
+long int narrow( Int val ) { return mpz_get_si( val.mpz ); }
+unsigned long int narrow( Int val ) { return mpz_get_ui( val.mpz ); }
+
+// comparison
+int ?==?( Int oper1, Int oper2 ) { return mpz_cmp( oper1.mpz, oper2.mpz ) == 0; }
+int ?==?( Int oper1, long int oper2 ) { return mpz_cmp_si( oper1.mpz, oper2 ) == 0; }
+int ?==?( long int oper2, Int oper1 ) { return mpz_cmp_si( oper1.mpz, oper2 ) == 0; }
+int ?==?( Int oper1, unsigned long int oper2 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) == 0; }
+int ?==?( unsigned long int oper2, Int oper1 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) == 0; }
+
+int ?!=?( Int oper1, Int oper2 ) { return ! ( oper1 == oper2 ); }
+int ?!=?( Int oper1, long int oper2 ) { return ! ( oper1 == oper2 ); }
+int ?!=?( long int oper1, Int oper2 ) { return ! ( oper1 == oper2 ); }
+int ?!=?( Int oper1, unsigned long int oper2 ) { return ! ( oper1 == oper2 ); }
+int ?!=?( unsigned long int oper1, Int oper2 ) { return ! ( oper1 == oper2 ); }
+
+int ?<?( Int oper1, Int oper2 ) { return mpz_cmp( oper1.mpz, oper2.mpz ) < 0; }
+int ?<?( Int oper1, long int oper2 ) { return mpz_cmp_si( oper1.mpz, oper2 ) < 0; }
+int ?<?( long int oper2, Int oper1 ) { return mpz_cmp_si( oper1.mpz, oper2 ) < 0; }
+int ?<?( Int oper1, unsigned long int oper2 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) < 0; }
+int ?<?( unsigned long int oper2, Int oper1 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) < 0; }
+
+int ?<=?( Int oper1, Int oper2 ) { return mpz_cmp( oper1.mpz, oper2.mpz ) <= 0; }
+int ?<=?( Int oper1, long int oper2 ) { return mpz_cmp_si( oper1.mpz, oper2 ) <= 0; }
+int ?<=?( long int oper2, Int oper1 ) { return mpz_cmp_si( oper1.mpz, oper2 ) <= 0; }
+int ?<=?( Int oper1, unsigned long int oper2 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) <= 0; }
+int ?<=?( unsigned long int oper2, Int oper1 ) { return mpz_cmp_ui( oper1.mpz, oper2 ) <= 0; }
+
+int ?>?( Int oper1, Int oper2 ) { return ! ( oper1 <= oper2 ); }
+int ?>?( Int oper1, long int oper2 ) { return ! ( oper1 <= oper2 ); }
+int ?>?( long int oper1, Int oper2 ) { return ! ( oper1 <= oper2 ); }
+int ?>?( Int oper1, unsigned long int oper2 ) { return ! ( oper1 <= oper2 ); }
+int ?>?( unsigned long int oper1, Int oper2 ) { return ! ( oper1 <= oper2 ); }
+
+int ?>=?( Int oper1, Int oper2 ) { return ! ( oper1 < oper2 ); }
+int ?>=?( Int oper1, long int oper2 ) { return ! ( oper1 < oper2 ); }
+int ?>=?( long int oper1, Int oper2 ) { return ! ( oper1 < oper2 ); }
+int ?>=?( Int oper1, unsigned long int oper2 ) { return ! ( oper1 < oper2 ); }
+int ?>=?( unsigned long int oper1, Int oper2 ) { return ! ( oper1 < oper2 ); }
+
+// arithmetic
+Int +?( Int oper ) { Int pos; mpz_set( pos.mpz, oper.mpz ); return pos; }
+Int -?( Int oper ) { Int neg; mpz_neg( neg.mpz, oper.mpz ); return neg; }
+Int ~?( Int oper ) { Int comp; mpz_com( comp.mpz, oper.mpz ); return comp; }
+
+Int ?&?( Int oper1, Int oper2 ) { Int conjunction; mpz_and( conjunction.mpz, oper1.mpz, oper2.mpz ); return conjunction; }
+Int ?&?( Int oper1, long int oper2 ) { Int conjunction, temp; mpz_set_si( temp.mpz, oper2 ); mpz_and( conjunction.mpz, oper1.mpz, temp.mpz ); return conjunction; }
+Int ?&?( long int oper1, Int oper2 ) { Int conjunction, temp; mpz_set_si( temp.mpz, oper1 ); mpz_and( conjunction.mpz, temp.mpz, oper2.mpz ); return conjunction; }
+Int ?&?( Int oper1, unsigned long int oper2 ) { Int conjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_and( conjunction.mpz, oper1.mpz, temp.mpz ); return conjunction; }
+Int ?&?( unsigned long int oper1, Int oper2 ) { Int conjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_and( conjunction.mpz, temp.mpz, oper2.mpz ); return conjunction; }
+Int ?&=?( Int * lhs, Int rhs ) { return *lhs = *lhs & rhs; }
+
+Int ?|?( Int oper1, Int oper2 ) { Int disjunction; mpz_ior( disjunction.mpz, oper1.mpz, oper2.mpz ); return disjunction; }
+Int ?|?( Int oper1, long int oper2 ) { Int disjunction, temp; mpz_set_si( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
+Int ?|?( long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_si( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
+Int ?|?( Int oper1, unsigned long int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
+Int ?|?( unsigned long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
+Int ?|=?( Int * lhs, Int rhs ) { return *lhs = *lhs | rhs; }
+
+Int ?^?( Int oper1, Int oper2 ) { Int disjunction; mpz_xor( disjunction.mpz, oper1.mpz, oper2.mpz ); return disjunction; }
+Int ?^?( Int oper1, long int oper2 ) { Int disjunction, temp; mpz_set_si( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
+Int ?^?( long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_si( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
+Int ?^?( Int oper1, unsigned long int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper2 ); mpz_ior( disjunction.mpz, oper1.mpz, temp.mpz ); return disjunction; }
+Int ?^?( unsigned long int oper1, Int oper2 ) { Int disjunction, temp; mpz_set_ui( temp.mpz, oper1 ); mpz_ior( disjunction.mpz, temp.mpz, oper2.mpz ); return disjunction; }
+Int ?^=?( Int * lhs, Int rhs ) { return *lhs = *lhs ^ rhs; }
+
+Int ?+?( Int addend1, Int addend2 ) { Int sum; mpz_add( sum.mpz, addend1.mpz, addend2.mpz ); return sum; }
+Int ?+?( Int addend1, long int addend2 ) { Int sum; if ( addend2 >= 0 ) mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); else mpz_sub_ui( sum.mpz, addend1.mpz, -addend2 ); return sum; }
+Int ?+?( long int addend2, Int addend1 ) { Int sum; if ( addend2 >= 0 ) mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); else mpz_sub_ui( sum.mpz, addend1.mpz, -addend2 ); return sum; }
+Int ?+?( Int addend1, unsigned long int addend2 ) { Int sum; mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); return sum; }
+Int ?+?( unsigned long int addend2, Int addend1 ) { Int sum; mpz_add_ui( sum.mpz, addend1.mpz, addend2 ); return sum; }
+Int ?+=?( Int * lhs, Int rhs ) { return *lhs = *lhs + rhs; }
+Int ?+=?( Int * lhs, long int rhs ) { return *lhs = *lhs + rhs; }
+Int ?+=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs + rhs; }
+Int ++?( Int * lhs ) { return *lhs += 1; }
+Int ?++( Int * lhs ) { Int ret = *lhs; *lhs += 1; return ret; }
+
+Int ?-?( Int minuend, Int subtrahend ) { Int diff; mpz_sub( diff.mpz, minuend.mpz, subtrahend.mpz ); return diff; }
+Int ?-?( Int minuend, long int subtrahend ) { Int diff; if ( subtrahend >= 0 ) mpz_sub_ui( diff.mpz, minuend.mpz, subtrahend ); else mpz_add_ui( diff.mpz, minuend.mpz, -subtrahend ); return diff; }
+Int ?-?( long int minuend, Int subtrahend ) { Int diff; if ( subtrahend >= 0 ) mpz_ui_sub( diff.mpz, minuend, subtrahend.mpz ); else { mpz_add_ui( diff.mpz, subtrahend.mpz, -minuend ); mpz_neg( diff.mpz, diff.mpz ); } return diff; }
+Int ?-?( Int minuend, unsigned long int subtrahend ) { Int diff; mpz_sub_ui( diff.mpz, minuend.mpz, subtrahend ); return diff; }
+Int ?-?( unsigned long int minuend, Int subtrahend ) { Int diff; mpz_ui_sub( diff.mpz, minuend, subtrahend.mpz ); return diff; }
+Int ?-=?( Int * lhs, Int rhs ) { return *lhs = *lhs - rhs; }
+Int ?-=?( Int * lhs, long int rhs ) { return *lhs = *lhs - rhs; }
+Int ?-=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs - rhs; }
+Int --?( Int * lhs ) { return *lhs -= 1; }
+Int ?--( Int * lhs ) { Int ret = *lhs; *lhs -= 1; return ret; }
+
+Int ?*?( Int multiplicator, Int multiplicand ) { Int product; mpz_mul( product.mpz, multiplicator.mpz, multiplicand.mpz ); return product; }
+Int ?*?( Int multiplicator, long int multiplicand ) { Int product; mpz_mul_si( product.mpz, multiplicator.mpz, multiplicand ); return product; }
+Int ?*?( long int multiplicand, Int multiplicator ) { Int product; mpz_mul_si( product.mpz, multiplicator.mpz, multiplicand ); return product; }
+Int ?*?( Int multiplicator, unsigned long int multiplicand ) { Int product; mpz_mul_ui( product.mpz, multiplicator.mpz, multiplicand ); return product; }
+Int ?*?( unsigned long int multiplicand, Int multiplicator ) { Int product; mpz_mul_ui( product.mpz, multiplicator.mpz, multiplicand ); return product; }
+Int ?*=?( Int * lhs, Int rhs ) { return *lhs = *lhs * rhs; }
+Int ?*=?( Int * lhs, long int rhs ) { return *lhs = *lhs * rhs; }
+Int ?*=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs * rhs; }
+
+Int ?/?( Int dividend, Int divisor ) { Int quotient; mpz_tdiv_q( quotient.mpz, dividend.mpz, divisor.mpz ); return quotient; }
+Int ?/?( Int dividend, unsigned long int divisor ) { Int quotient; mpz_tdiv_q_ui( quotient.mpz, dividend.mpz, divisor ); return quotient; }
+Int ?/?( unsigned long int dividend, Int divisor ) {
+	Int quotient;
+    if ( mpz_sgn( divisor.mpz ) >= 0 ) {
+		if ( mpz_fits_ulong_p( divisor.mpz ) )
+			mpz_set_ui( quotient.mpz, dividend / mpz_get_ui( divisor.mpz ) );
+		else
+			mpz_set_ui( quotient.mpz, 0 );
+	} else {
+		mpz_neg( quotient.mpz, divisor.mpz );
+		if ( mpz_fits_ulong_p( quotient.mpz ) ) {
+			mpz_set_ui( quotient.mpz, dividend / mpz_get_ui( quotient.mpz ) );
+			mpz_neg( quotient.mpz, quotient.mpz );
+		} else
+			mpz_set_ui( quotient.mpz, 0 );
+	} // if
+	return quotient;
+} // ?/?
+Int ?/?( Int dividend, long int divisor ) {
+	Int quotient;
+    if ( divisor >= 0 )
+		mpz_tdiv_q_ui( quotient.mpz, dividend.mpz, divisor );
+    else {
+		mpz_tdiv_q_ui( quotient.mpz, dividend.mpz, -divisor );
+		mpz_neg( quotient.mpz, quotient.mpz );
+	} // if
+	return quotient;
+} // ?/?
+Int ?/?( long int dividend, Int divisor ) {
+	Int quotient;
+    if ( mpz_fits_slong_p( divisor.mpz ) )
+		mpz_set_si( quotient.mpz, dividend / mpz_get_si( divisor.mpz ) );
+    else {
+        // if divisor is bigger than a long then the quotient must be zero, unless dividend==LONG_MIN and
+        // dividend==-LONG_MIN in which case the quotient is -1
+        mpz_set_si( quotient.mpz, mpz_cmpabs_ui( divisor.mpz, (dividend >= 0 ? dividend : -dividend)) == 0 ? -1 : 0 );
+	} // if
+	return quotient;
+} // ?/?
+Int ?/=?( Int * lhs, Int rhs ) { return *lhs = *lhs / rhs; }
+Int ?/=?( Int * lhs, long int rhs ) { return *lhs = *lhs / rhs; }
+Int ?/=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs / rhs; }
+
+[ Int, Int ] div( Int dividend, Int divisor ) { Int quotient, remainder; mpz_fdiv_qr( quotient.mpz, remainder.mpz, dividend.mpz, divisor.mpz ); return [ quotient, remainder ]; }
+[ Int, Int ] div( Int dividend, unsigned long int divisor ) { Int quotient, remainder; mpz_fdiv_qr_ui( quotient.mpz, remainder.mpz, dividend.mpz, divisor ); return [ quotient, remainder ]; }
+
+Int ?%?( Int dividend, Int divisor ) { Int remainder; mpz_tdiv_r( remainder.mpz, dividend.mpz, divisor.mpz ); return remainder; }
+Int ?%?( Int dividend, unsigned long int divisor ) { Int remainder; mpz_tdiv_r_ui( remainder.mpz, dividend.mpz, divisor ); return remainder; }
+Int ?%?( unsigned long int dividend, Int divisor ) {
+	Int remainder;
+    if ( mpz_sgn( divisor.mpz ) >= 0 ) {
+		if ( mpz_fits_ulong_p( divisor.mpz ) )
+			mpz_set_ui( remainder.mpz, dividend % mpz_get_ui( divisor.mpz ) );
+		else
+			mpz_set_ui( remainder.mpz, dividend );
+	} else {
+		mpz_neg( remainder.mpz, divisor.mpz );
+		if ( mpz_fits_ulong_p( remainder.mpz ) )
+			mpz_set_ui( remainder.mpz, dividend % mpz_get_ui( remainder.mpz ) );
+		else
+			mpz_set_ui( remainder.mpz, dividend );
+	} // if
+	return remainder;
+} // ?%?
+Int ?%?( Int dividend, long int divisor ) {
+	Int remainder;
+    mpz_tdiv_r_ui( remainder.mpz, dividend.mpz, (divisor >= 0 ? divisor : -divisor));
+	return remainder;
+} // ?%?
+Int ?%?( long int dividend, Int divisor ) {
+	Int remainder;
+    if ( mpz_fits_slong_p( divisor.mpz ) )
+		mpz_set_si( remainder.mpz, dividend % mpz_get_si( divisor.mpz ) );
+	else {
+		// if divisor is bigger than a long then the remainder is dividend unchanged, unless dividend==LONG_MIN and
+		// dividend==-LONG_MIN in which case the remainder is 0
+        mpz_set_si( remainder.mpz, mpz_cmpabs_ui( divisor.mpz, (dividend >= 0 ? dividend : -dividend)) == 0 ? 0 : dividend);
+	} // if
+	return remainder;
+} // ?%?
+Int ?%=?( Int * lhs, Int rhs ) { return *lhs = *lhs % rhs; }
+Int ?%=?( Int * lhs, long int rhs ) { return *lhs = *lhs % rhs; }
+Int ?%=?( Int * lhs, unsigned long int rhs ) { return *lhs = *lhs % rhs; }
+
+Int ?<<?( Int shiften, mp_bitcnt_t shift ) { Int shifted; mpz_mul_2exp( shifted.mpz, shiften.mpz, shift ); return shifted; }
+Int ?<<=?( Int * lhs, mp_bitcnt_t shift ) { return *lhs = *lhs << shift; }
+Int ?>>?( Int shiften, mp_bitcnt_t shift ) { Int shifted; mpz_fdiv_q_2exp( shifted.mpz, shiften.mpz, shift ); return shifted; }
+Int ?>>=?( Int * lhs, mp_bitcnt_t shift ) { return *lhs = *lhs >> shift; }
+
+// number functions
+Int abs( Int oper ) { Int positive; mpz_abs( positive.mpz, oper.mpz ); return positive; }
+Int fact( unsigned long int N ) { Int factorial; mpz_fac_ui( factorial.mpz, N ); return factorial; }
+Int gcd( Int oper1, Int oper2 ) { Int gcdret; mpz_gcd( gcdret.mpz, oper1.mpz, oper2.mpz ); return gcdret; }
+Int pow( Int base, unsigned long int exponent ) { Int power; mpz_pow_ui( power.mpz, base.mpz, exponent ); return power; }
+Int pow( unsigned long int base, unsigned long int exponent ) { Int power; mpz_ui_pow_ui( power.mpz, base, exponent ); return power; }
+void srandom( gmp_randstate_t state ) { gmp_randinit_default( state ); }
+Int random( gmp_randstate_t state, mp_bitcnt_t n ) { Int rand; mpz_urandomb( rand.mpz, state, n ); return rand; }
+Int random( gmp_randstate_t state, Int n ) { Int rand; mpz_urandomm( rand.mpz, state, n.mpz ); return rand; }
+Int random( gmp_randstate_t state, mp_size_t max_size ) { Int rand; mpz_random( rand.mpz, max_size ); return rand; }
+int sgn( Int oper ) { return mpz_sgn( oper.mpz ); }
+Int sqrt( Int oper ) { Int root; mpz_sqrt( root.mpz, oper.mpz ); return root; }
+
+// I/O
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, Int * mp ) {
+ 	gmp_scanf( "%Zd", mp );
+ 	return is;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype * os, Int mp ) {
+	if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
+	gmp_printf( "%Zd", mp.mpz );
+	sepOn( os );
+ 	return os;
+} // ?|?
+
+// Local Variables: //
+// mode: c //
+// tab-width: 4 //
+// End: //
Index: src/libcfa/iostream.c
===================================================================
--- src/libcfa/iostream.c	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/libcfa/iostream.c	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Mar 23 08:20:40 2017
-// Update Count     : 367
+// Last Modified On : Mon May  8 18:24:23 2017
+// Update Count     : 369
 //
 
@@ -160,9 +160,9 @@
 		[(unsigned char)'¡'] : Open, [(unsigned char)'¿'] : Open, [(unsigned char)'«'] : Open,
 		// closing delimiters, no space before
-		[','] : Close, ['.'] : Close, [':'] : Close, [';'] : Close, ['!'] : Close, ['?'] : Close,
+		[','] : Close, ['.'] : Close, [';'] : Close, ['!'] : Close, ['?'] : Close,
 		['%'] : Close, [(unsigned char)'¢'] : Close, [(unsigned char)'»'] : Close,
 		[')'] : Close, [']'] : Close, ['}'] : Close,
 		// opening-closing delimiters, no space before or after
-		['\''] : OpenClose, ['`'] : OpenClose, ['"'] : OpenClose,
+		['\''] : OpenClose, ['`'] : OpenClose, ['"'] : OpenClose, [':'] : OpenClose,
 		[' '] : OpenClose, ['\f'] : OpenClose, ['\n'] : OpenClose, ['\r'] : OpenClose, ['\t'] : OpenClose, ['\v'] : OpenClose, // isspace
 	}; // mask
Index: src/libcfa/rational
===================================================================
--- src/libcfa/rational	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/libcfa/rational	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -12,6 +12,6 @@
 // Created On       : Wed Apr  6 17:56:25 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon May  1 08:25:06 2017
-// Update Count     : 33
+// Last Modified On : Sun May 14 16:49:13 2017
+// Update Count     : 78
 //
 
@@ -21,49 +21,124 @@
 #include "iostream"
 
+trait scalar( otype T ) {
+};
+
+trait arithmetic( otype T | scalar( T ) ) {
+	int !?( T );
+	int ?==?( T, T );
+	int ?!=?( T, T );
+	int ?<?( T, T );
+	int ?<=?( T, T );
+	int ?>?( T, T );
+	int ?>=?( T, T );
+	void ?{}( T *, zero_t );
+	void ?{}( T *, one_t );
+	T +?( T );
+	T -?( T );
+	T ?+?( T, T );
+	T ?-?( T, T );
+	T ?*?( T, T );
+	T ?/?( T, T );
+	T ?%?( T, T );
+	T ?/=?( T *, T );
+	T abs( T );
+};
+
 // implementation
-typedef long int RationalImpl;
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
 struct Rational {
-	RationalImpl numerator, denominator;					// invariant: denominator > 0
+	RationalImpl numerator, denominator;				// invariant: denominator > 0
 }; // Rational
 
-// constants
-extern struct Rational 0;
-extern struct Rational 1;
+// constructors
 
-// constructors
-void ?{}( Rational * r );
-void ?{}( Rational * r, RationalImpl n );
-void ?{}( Rational * r, RationalImpl n, RationalImpl d );
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+void ?{}( Rational(RationalImpl) * r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+void ?{}( Rational(RationalImpl) * r, RationalImpl n );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+void ?{}( Rational(RationalImpl) * r, RationalImpl n, RationalImpl d );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+void ?{}( Rational(RationalImpl) * r, zero_t );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+void ?{}( Rational(RationalImpl) * r, one_t );
 
 // getter for numerator/denominator
-RationalImpl numerator( Rational r );
-RationalImpl denominator( Rational r );
-[ RationalImpl, RationalImpl ] ?=?( * [ RationalImpl, RationalImpl ] dest, Rational src );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+RationalImpl numerator( Rational(RationalImpl) r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+RationalImpl denominator( Rational(RationalImpl) r );
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+[ RationalImpl, RationalImpl ] ?=?( * [ RationalImpl, RationalImpl ] dest, Rational(RationalImpl) src );
+
 // setter for numerator/denominator
-RationalImpl numerator( Rational r, RationalImpl n );
-RationalImpl denominator( Rational r, RationalImpl d );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+RationalImpl numerator( Rational(RationalImpl) r, RationalImpl n );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+RationalImpl denominator( Rational(RationalImpl) r, RationalImpl d );
 
 // comparison
-int ?==?( Rational l, Rational r );
-int ?!=?( Rational l, Rational r );
-int ?<?( Rational l, Rational r );
-int ?<=?( Rational l, Rational r );
-int ?>?( Rational l, Rational r );
-int ?>=?( Rational l, Rational r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?==?( Rational(RationalImpl) l, Rational(RationalImpl) r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?!=?( Rational(RationalImpl) l, Rational(RationalImpl) r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?<?( Rational(RationalImpl) l, Rational(RationalImpl) r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?<=?( Rational(RationalImpl) l, Rational(RationalImpl) r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?>?( Rational(RationalImpl) l, Rational(RationalImpl) r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?>=?( Rational(RationalImpl) l, Rational(RationalImpl) r );
 
 // arithmetic
-Rational -?( Rational r );
-Rational ?+?( Rational l, Rational r );
-Rational ?-?( Rational l, Rational r );
-Rational ?*?( Rational l, Rational r );
-Rational ?/?( Rational l, Rational r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) +?( Rational(RationalImpl) r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) -?( Rational(RationalImpl) r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) ?+?( Rational(RationalImpl) l, Rational(RationalImpl) r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) ?-?( Rational(RationalImpl) l, Rational(RationalImpl) r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) ?*?( Rational(RationalImpl) l, Rational(RationalImpl) r );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) ?/?( Rational(RationalImpl) l, Rational(RationalImpl) r );
 
 // conversion
-double widen( Rational r );
-Rational narrow( double f, RationalImpl md );
+// forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+// double widen( Rational(RationalImpl) r );
+// forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+// Rational(RationalImpl) narrow( double f, RationalImpl md );
 
 // I/O
-forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, Rational * );
-forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, Rational );
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+forall( dtype istype | istream( istype ) | { istype * ?|?( istype *, RationalImpl * ); } )
+istype * ?|?( istype *, Rational(RationalImpl) * );
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+forall( dtype ostype | ostream( ostype ) | { ostype * ?|?( ostype *, RationalImpl ); } )
+ostype * ?|?( ostype *, Rational(RationalImpl ) );
 
 #endif // RATIONAL_H
Index: src/libcfa/rational.c
===================================================================
--- src/libcfa/rational.c	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/libcfa/rational.c	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -10,6 +10,6 @@
 // Created On       : Wed Apr  6 17:54:28 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Apr 27 17:05:06 2017
-// Update Count     : 51
+// Last Modified On : Sun May 14 17:25:19 2017
+// Update Count     : 131
 // 
 
@@ -17,12 +17,4 @@
 #include "fstream"
 #include "stdlib"
-#include "math"											// floor
-
-
-// constants
-
-struct Rational 0 = {0, 1};
-struct Rational 1 = {1, 1};
-
 
 // helper routines
@@ -30,8 +22,9 @@
 // Calculate greatest common denominator of two numbers, the first of which may be negative. Used to reduce rationals.
 // alternative: https://en.wikipedia.org/wiki/Binary_GCD_algorithm
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
 static RationalImpl gcd( RationalImpl a, RationalImpl b ) {
 	for ( ;; ) {										// Euclid's algorithm
 		RationalImpl r = a % b;
-	  if ( r == 0 ) break;
+	  if ( r == (RationalImpl){0} ) break;
 		a = b;
 		b = r;
@@ -40,10 +33,11 @@
 } // gcd
 
-static RationalImpl simplify( RationalImpl *n, RationalImpl *d ) {
-	if ( *d == 0 ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+static RationalImpl simplify( RationalImpl * n, RationalImpl * d ) {
+	if ( *d == (RationalImpl){0} ) {
 		serr | "Invalid rational number construction: denominator cannot be equal to 0." | endl;
 		exit( EXIT_FAILURE );
 	} // exit
-	if ( *d < 0 ) { *d = -*d; *n = -*n; }				// move sign to numerator
+	if ( *d < (RationalImpl){0} ) { *d = -*d; *n = -*n; } // move sign to numerator
 	return gcd( abs( *n ), *d );						// simplify
 } // Rationalnumber::simplify
@@ -52,13 +46,16 @@
 // constructors
 
-void ?{}( Rational * r ) {
-	r{ 0, 1 };
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+void ?{}( Rational(RationalImpl) * r ) {
+	r{ (RationalImpl){0}, (RationalImpl){1} };
 } // rational
 
-void ?{}( Rational * r, RationalImpl n ) {
-	r{ n, 1 };
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+void ?{}( Rational(RationalImpl) * r, RationalImpl n ) {
+	r{ n, (RationalImpl){1} };
 } // rational
 
-void ?{}( Rational * r, RationalImpl n, RationalImpl d ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+void ?{}( Rational(RationalImpl) * r, RationalImpl n, RationalImpl d ) {
 	RationalImpl t = simplify( &n, &d );				// simplify
 	r->numerator = n / t;
@@ -69,13 +66,16 @@
 // getter for numerator/denominator
 
-RationalImpl numerator( Rational r ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+RationalImpl numerator( Rational(RationalImpl) r ) {
 	return r.numerator;
 } // numerator
 
-RationalImpl denominator( Rational r ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+RationalImpl denominator( Rational(RationalImpl) r ) {
 	return r.denominator;
 } // denominator
 
-[ RationalImpl, RationalImpl ] ?=?( * [ RationalImpl, RationalImpl ] dest, Rational src ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+[ RationalImpl, RationalImpl ] ?=?( * [ RationalImpl, RationalImpl ] dest, Rational(RationalImpl) src ) {
 	return *dest = src.[ numerator, denominator ];
 }
@@ -83,5 +83,6 @@
 // setter for numerator/denominator
 
-RationalImpl numerator( Rational r, RationalImpl n ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+RationalImpl numerator( Rational(RationalImpl) r, RationalImpl n ) {
 	RationalImpl prev = r.numerator;
 	RationalImpl t = gcd( abs( n ), r.denominator );		// simplify
@@ -91,5 +92,6 @@
 } // numerator
 
-RationalImpl denominator( Rational r, RationalImpl d ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+RationalImpl denominator( Rational(RationalImpl) r, RationalImpl d ) {
 	RationalImpl prev = r.denominator;
 	RationalImpl t = simplify( &r.numerator, &d );			// simplify
@@ -102,25 +104,31 @@
 // comparison
 
-int ?==?( Rational l, Rational r ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?==?( Rational(RationalImpl) l, Rational(RationalImpl) r ) {
 	return l.numerator * r.denominator == l.denominator * r.numerator;
 } // ?==?
 
-int ?!=?( Rational l, Rational r ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?!=?( Rational(RationalImpl) l, Rational(RationalImpl) r ) {
 	return ! ( l == r );
 } // ?!=?
 
-int ?<?( Rational l, Rational r ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?<?( Rational(RationalImpl) l, Rational(RationalImpl) r ) {
 	return l.numerator * r.denominator < l.denominator * r.numerator;
 } // ?<?
 
-int ?<=?( Rational l, Rational r ) {
-	return l < r || l == r;
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?<=?( Rational(RationalImpl) l, Rational(RationalImpl) r ) {
+	return l.numerator * r.denominator <= l.denominator * r.numerator;
 } // ?<=?
 
-int ?>?( Rational l, Rational r ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?>?( Rational(RationalImpl) l, Rational(RationalImpl) r ) {
 	return ! ( l <= r );
 } // ?>?
 
-int ?>=?( Rational l, Rational r ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+int ?>=?( Rational(RationalImpl) l, Rational(RationalImpl) r ) {
 	return ! ( l < r );
 } // ?>=?
@@ -129,40 +137,51 @@
 // arithmetic
 
-Rational -?( Rational r ) {
-	Rational t = { -r.numerator, r.denominator };
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) +?( Rational(RationalImpl) r ) {
+	Rational(RationalImpl) t = { r.numerator, r.denominator };
+	return t;
+} // +?
+
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) -?( Rational(RationalImpl) r ) {
+	Rational(RationalImpl) t = { -r.numerator, r.denominator };
 	return t;
 } // -?
 
-Rational ?+?( Rational l, Rational r ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) ?+?( Rational(RationalImpl) l, Rational(RationalImpl) r ) {
 	if ( l.denominator == r.denominator ) {				// special case
-		Rational t = { l.numerator + r.numerator, l.denominator };
+		Rational(RationalImpl) t = { l.numerator + r.numerator, l.denominator };
 		return t;
 	} else {
-		Rational t = { l.numerator * r.denominator + l.denominator * r.numerator, l.denominator * r.denominator };
+		Rational(RationalImpl) t = { l.numerator * r.denominator + l.denominator * r.numerator, l.denominator * r.denominator };
 		return t;
 	} // if
 } // ?+?
 
-Rational ?-?( Rational l, Rational r ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) ?-?( Rational(RationalImpl) l, Rational(RationalImpl) r ) {
 	if ( l.denominator == r.denominator ) {				// special case
-		Rational t = { l.numerator - r.numerator, l.denominator };
+		Rational(RationalImpl) t = { l.numerator - r.numerator, l.denominator };
 		return t;
 	} else {
-		Rational t = { l.numerator * r.denominator - l.denominator * r.numerator, l.denominator * r.denominator };
+		Rational(RationalImpl) t = { l.numerator * r.denominator - l.denominator * r.numerator, l.denominator * r.denominator };
 		return t;
 	} // if
 } // ?-?
 
-Rational ?*?( Rational l, Rational r ) {
-	Rational t = { l.numerator * r.numerator, l.denominator * r.denominator };
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) ?*?( Rational(RationalImpl) l, Rational(RationalImpl) r ) {
+	Rational(RationalImpl) t = { l.numerator * r.numerator, l.denominator * r.denominator };
 	return t;
 } // ?*?
 
-Rational ?/?( Rational l, Rational r ) {
-	if ( r.numerator < 0 ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+Rational(RationalImpl) ?/?( Rational(RationalImpl) l, Rational(RationalImpl) r ) {
+	if ( r.numerator < (RationalImpl){0} ) {
 		r.numerator = -r.numerator;
 		r.denominator = -r.denominator;
 	} // if
-	Rational t = { l.numerator * r.denominator, l.denominator * r.numerator };
+	Rational(RationalImpl) t = { l.numerator * r.denominator, l.denominator * r.numerator };
 	return t;
 } // ?/?
@@ -171,41 +190,44 @@
 // conversion
 
-double widen( Rational r ) {
-	return (double)r.numerator / (double)r.denominator;
-} // widen
-
-// http://www.ics.uci.edu/~eppstein/numth/frap.c
-Rational narrow( double f, RationalImpl md ) {
-	if ( md <= 1 ) {									// maximum fractional digits too small?
-		return (Rational){ f, 1};						// truncate fraction
-	} // if
-
-	// continued fraction coefficients
-	RationalImpl m00 = 1, m11 = 1, m01 = 0, m10 = 0;
-	RationalImpl ai, t;
-
-	// find terms until denom gets too big
-	for ( ;; ) {
-		ai = (RationalImpl)f;
-	  if ( ! (m10 * ai + m11 <= md) ) break;
-		t = m00 * ai + m01;
-		m01 = m00;
-		m00 = t;
-		t = m10 * ai + m11;
-		m11 = m10;
-		m10 = t;
-		t = (double)ai;
-	  if ( f == t ) break;								// prevent division by zero
-		f = 1 / (f - t);
-	  if ( f > (double)0x7FFFFFFF ) break;				// representation failure
-	} 
-	return (Rational){ m00, m10 };
-} // narrow
+// forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+// double widen( Rational(RationalImpl) r ) {
+// 	return (double)r.numerator / (double)r.denominator;
+// } // widen
+
+// // http://www.ics.uci.edu/~eppstein/numth/frap.c
+// forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+// Rational(RationalImpl) narrow( double f, RationalImpl md ) {
+// 	if ( md <= 1 ) {									// maximum fractional digits too small?
+// 		return (Rational(RationalImpl)){ f, 1};			// truncate fraction
+// 	} // if
+
+// 	// continued fraction coefficients
+// 	RationalImpl m00 = 1, m11 = 1, m01 = 0, m10 = 0;
+// 	RationalImpl ai, t;
+
+// 	// find terms until denom gets too big
+// 	for ( ;; ) {
+// 		ai = (RationalImpl)f;
+// 	  if ( ! (m10 * ai + m11 <= md) ) break;
+// 		t = m00 * ai + m01;
+// 		m01 = m00;
+// 		m00 = t;
+// 		t = m10 * ai + m11;
+// 		m11 = m10;
+// 		m10 = t;
+// 		t = (double)ai;
+// 	  if ( f == t ) break;								// prevent division by zero
+// 	  f = 1 / (f - (double)t);
+// 	  if ( f > (double)0x7FFFFFFF ) break;				// representation failure
+// 	} 
+// 	return (Rational(RationalImpl)){ m00, m10 };
+// } // narrow
 
 
 // I/O
 
-forall( dtype istype | istream( istype ) )
-istype * ?|?( istype *is, Rational *r ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+forall( dtype istype | istream( istype ) | { istype * ?|?( istype *, RationalImpl * ); } )
+istype * ?|?( istype * is, Rational(RationalImpl) * r ) {
 	RationalImpl t;
 	is | &(r->numerator) | &(r->denominator);
@@ -216,6 +238,7 @@
 } // ?|?
 
-forall( dtype ostype | ostream( ostype ) )
-ostype * ?|?( ostype *os, Rational r ) {
+forall ( otype RationalImpl | arithmetic( RationalImpl ) )
+forall( dtype ostype | ostream( ostype ) | { ostype * ?|?( ostype *, RationalImpl ); } )
+ostype * ?|?( ostype * os, Rational(RationalImpl ) r ) {
 	return os | r.numerator | '/' | r.denominator;
 } // ?|?
Index: src/libcfa/stdlib
===================================================================
--- src/libcfa/stdlib	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/libcfa/stdlib	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Apr  1 17:35:24 2017
-// Update Count     : 104
+// Last Modified On : Tue May  9 08:42:44 2017
+// Update Count     : 107
 //
 
@@ -84,6 +84,8 @@
 forall( otype T | { int ?<?( T, T ); } )
 T * bsearch( T key, const T * arr, size_t dimension );
+
 forall( otype T | { int ?<?( T, T ); } )
 unsigned int bsearch( T key, const T * arr, size_t dimension );
+
 
 forall( otype T | { int ?<?( T, T ); } )
@@ -107,4 +109,6 @@
 double abs( double _Complex );
 long double abs( long double _Complex );
+forall ( otype T | { void ?{}( T *, zero_t ); int ?<?( T, T ); T -?( T ); } )
+T abs( T );
 
 //---------------------------------------
Index: src/libcfa/stdlib.c
===================================================================
--- src/libcfa/stdlib.c	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/libcfa/stdlib.c	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:10:29 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Apr 16 10:41:05 2017
-// Update Count     : 189
+// Last Modified On : Tue May  9 08:43:00 2017
+// Update Count     : 191
 //
 
@@ -27,25 +27,32 @@
 } // extern "C"
 
-forall( dtype T | sized(T) ) T * malloc( void ) {
-	//printf( "malloc1\n" );
-    return (T *)(void*)malloc( (size_t)sizeof(T) );
+forall( dtype T | sized(T) ) T * malloc( void ) {		// type-safe
+    return (T *)(void *)malloc( (size_t)sizeof(T) );
 } // malloc
-forall( dtype T | sized(T) ) T * malloc( char fill ) {
-	//printf( "malloc3\n" );
-	T * ptr = (T *)(void*)malloc( (size_t)sizeof(T) );
+
+forall( dtype T | sized(T) ) T * malloc( char fill ) {	// initial with fill value (like calloc)
+	T * ptr = (T *)(void *)malloc( (size_t)sizeof(T) );
     return memset( ptr, (int)fill, sizeof(T) );
 } // malloc
 
-forall( dtype T | sized(T) ) T * calloc( size_t nmemb ) {
-	//printf( "calloc\n" );
+forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size ) { // alternative realloc
+    return (T *)realloc( ptr, size );
+} // malloc
+
+forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size, unsigned char fill ) { // alternative realloc with fill value
+    return (T *)realloc( ptr, size, fill );
+} // malloc
+
+
+forall( dtype T | sized(T) ) T * calloc( size_t nmemb ) { // type-safe array initialization with fill 0
     return (T *)calloc( nmemb, sizeof(T) );
 } // calloc
 
-forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size ) {
-	//printf( "realloc1\n" );
+
+forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size ) { // type-safe
     return (T *)(void *)realloc( (void *)ptr, size );
 } // realloc
-forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size, unsigned char fill ) {
-	//printf( "realloc2\n" );
+
+forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size, unsigned char fill ) { // alternative realloc with fill value
     char * nptr = (T *)(void *)realloc( (void *)ptr, size );
     size_t unused = malloc_usable_size( nptr );
@@ -54,40 +61,30 @@
 } // realloc
 
-forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size ) {
-	//printf( "malloc4\n" );
-    return (T *)realloc( ptr, size );
-} // malloc
-forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size, unsigned char fill ) {
-	//printf( "malloc5\n" );
-    return (T *)realloc( ptr, size, fill );
-} // malloc
-
-forall( dtype T | sized(T) ) T * aligned_alloc( size_t alignment ) {
-	//printf( "aligned_alloc\n" );
+
+forall( dtype T | sized(T) ) T * aligned_alloc( size_t alignment ) { // aligned allocation
     return (T *)memalign( alignment, sizeof(T) );
 } // aligned_alloc
 
 forall( dtype T | sized(T) ) T * memalign( size_t alignment ) {
-	//printf( "memalign\n" );
     return (T *)memalign( alignment, sizeof(T) );
 } // memalign
 
 forall( dtype T | sized(T) ) int posix_memalign( T ** ptr, size_t alignment ) {
-	//printf( "posix_memalign\n" );
     return posix_memalign( (void **)ptr, alignment, sizeof(T) );
 } // posix_memalign
 
-forall( dtype T, ttype Params | sized(T) | { void ?{}( T *, Params ); } )
+
+forall( dtype T, ttype Params | sized(T) | { void ?{}( T *, Params ); } ) //  new
 T * new( Params p ) {
 	return ((T *)malloc()){ p };
-}
-
-forall( dtype T | { void ^?{}(T *); } )
+} // new
+
+forall( dtype T | { void ^?{}(T *); } )					// delete
 void delete( T * ptr ) {
-  if ( ptr ) {
-    ^ptr{};
-    free( ptr );
-  }
-}
+	if ( ptr ) {
+		^ptr{};
+		free( ptr );
+	}
+} // delete
 
 forall( dtype T, ttype Params | { void ^?{}(T *); void delete(Params); } )
@@ -98,5 +95,5 @@
 	}
 	delete( rest );
-}
+} // delete
 
 //---------------------------------------
@@ -106,30 +103,36 @@
 	if ( sscanf( ptr, "%d", &i ) == EOF ) {}
 	return i;
-}
+} // ato
+
 unsigned int ato( const char * ptr ) {
 	unsigned int ui;
 	if ( sscanf( ptr, "%u", &ui ) == EOF ) {}
 	return ui;
-}
+} // ato
+
 long int ato( const char * ptr ) {
 	long int li;
 	if ( sscanf( ptr, "%ld", &li ) == EOF ) {}
 	return li;
-}
+} // ato
+
 unsigned long int ato( const char * ptr ) {
 	unsigned long int uli;
 	if ( sscanf( ptr, "%lu", &uli ) == EOF ) {}
 	return uli;
-}
+} // ato
+
 long long int ato( const char * ptr ) {
 	long long int lli;
 	if ( sscanf( ptr, "%lld", &lli ) == EOF ) {}
 	return lli;
-}
+} // ato
+
 unsigned long long int ato( const char * ptr ) {
 	unsigned long long int ulli;
 	if ( sscanf( ptr, "%llu", &ulli ) == EOF ) {}
 	return ulli;
-}
+} // ato
+
 
 float ato( const char * ptr ) {
@@ -137,15 +140,18 @@
 	if ( sscanf( ptr, "%f", &f ) == EOF ) {}
 	return f;
-}
+} // ato
+
 double ato( const char * ptr ) {
 	double d;
 	if ( sscanf( ptr, "%lf", &d ) == EOF ) {}
 	return d;
-}
+} // ato
+
 long double ato( const char * ptr ) {
 	long double ld;
 	if ( sscanf( ptr, "%Lf", &ld ) == EOF ) {}
 	return ld;
-}
+} // ato
+
 
 float _Complex ato( const char * ptr ) {
@@ -153,44 +159,56 @@
 	if ( sscanf( ptr, "%g%gi", &re, &im ) == EOF ) {}
 	return re + im * _Complex_I;
-}
+} // ato
+
 double _Complex ato( const char * ptr ) {
 	double re, im;
 	if ( sscanf( ptr, "%lf%lfi", &re, &im ) == EOF ) {}
 	return re + im * _Complex_I;
-}
+} // ato
+
 long double _Complex ato( const char * ptr ) {
 	long double re, im;
 	if ( sscanf( ptr, "%Lf%Lfi", &re, &im ) == EOF ) {}
 	return re + im * _Complex_I;
-}
+} // ato
+
 
 int strto( const char * sptr, char ** eptr, int base ) {
 	return (int)strtol( sptr, eptr, base );
-}
+} // strto
+
 unsigned int strto( const char * sptr, char ** eptr, int base ) {
 	return (unsigned int)strtoul( sptr, eptr, base );
-}
+} // strto
+
 long int strto( const char * sptr, char ** eptr, int base ) {
 	return strtol( sptr, eptr, base );
-}
+} // strto
+
 unsigned long int strto( const char * sptr, char ** eptr, int base ) {
 	return strtoul( sptr, eptr, base );
-}
+} // strto
+
 long long int strto( const char * sptr, char ** eptr, int base ) {
 	return strtoll( sptr, eptr, base );
-}
+} // strto
+
 unsigned long long int strto( const char * sptr, char ** eptr, int base ) {
 	return strtoull( sptr, eptr, base );
-}
+} // strto
+
 
 float strto( const char * sptr, char ** eptr ) {
 	return strtof( sptr, eptr );
-}
+} // strto
+
 double strto( const char * sptr, char ** eptr ) {
 	return strtod( sptr, eptr );
-}
+} // strto
+
 long double strto( const char * sptr, char ** eptr ) {
 	return strtold( sptr, eptr );
-}
+} // strto
+
 
 float _Complex strto( const char * sptr, char ** eptr ) {
@@ -201,5 +219,6 @@
 	if ( sptr == *eptr ) return 0.0;
 	return re + im * _Complex_I;
-}
+} // strto
+
 double _Complex strto( const char * sptr, char ** eptr ) {
 	double re, im;
@@ -209,5 +228,6 @@
 	if ( sptr == *eptr ) return 0.0;
 	return re + im * _Complex_I;
-}
+} // strto
+
 long double _Complex strto( const char * sptr, char ** eptr ) {
 	long double re, im;
@@ -217,5 +237,5 @@
 	if ( sptr == *eptr ) return 0.0;
 	return re + im * _Complex_I;
-}
+} // strto
 
 //---------------------------------------
Index: src/main.cc
===================================================================
--- src/main.cc	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/main.cc	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -1,2 +1,3 @@
+
 //
 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
@@ -9,7 +10,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Fri May 15 23:12:02 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Dec 14 14:35:54 2016
-// Update Count     : 436
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed May 10 14:45:00 2017
+// Update Count     : 437
 //
 
@@ -79,5 +80,6 @@
 	errorp = false,
 	codegenp = false,
-	prettycodegenp = false;
+	prettycodegenp = false,
+	nolinemarks = false;
 
 static void parse_cmdline( int argc, char *argv[], const char *& filename );
@@ -310,5 +312,5 @@
 
 		CodeTools::fillLocations( translationUnit );
-		CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true );
+		CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, ! nolinemarks );
 
 		CodeGen::FixMain::fix( *output, treep ? "../prelude/bootloader.c" : CFA_LIBDIR "/bootloader.c" );
@@ -336,5 +338,5 @@
 	} catch ( CompilerError &e ) {
 		cerr << "Compiler Error: " << e.get_what() << endl;
-		cerr << "(please report bugs to " << endl;
+		cerr << "(please report bugs to [REDACTED])" << endl;
 		if ( output != &cout ) {
 			delete output;
@@ -375,5 +377,5 @@
 
 	int c;
-	while ( (c = getopt_long( argc, argv, "abBcdefglmnpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
+	while ( (c = getopt_long( argc, argv, "abBcdefglLmnpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
 		switch ( c ) {
 		  case Ast:
@@ -411,4 +413,7 @@
 		  case 'l':										// generate libcfa.c
 			libcfap = true;
+			break;
+		  case 'L':										// surpress lines marks
+			nolinemarks = true;
 			break;
 		  case Nopreamble:
Index: src/prelude/Makefile.am
===================================================================
--- src/prelude/Makefile.am	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/prelude/Makefile.am	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -42,5 +42,5 @@
 
 bootloader.c : bootloader.cf prelude.cf extras.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
-	${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpm bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
+	${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpmL bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
 
 MAINTAINERCLEANFILES = builtins.c builtins.cf extras.cf bootloader.c ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
Index: src/prelude/Makefile.in
===================================================================
--- src/prelude/Makefile.in	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/prelude/Makefile.in	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -439,5 +439,5 @@
 
 bootloader.c : bootloader.cf prelude.cf extras.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
-	${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpm bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
+	${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpmL bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
Index: src/tests/.expect/32/KRfunctions.txt
===================================================================
--- src/tests/.expect/32/KRfunctions.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/32/KRfunctions.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -31,6 +31,8 @@
 }
 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
+    struct S ___ret__2sS_1;
     ((void)((*___dst__P2sS_1).__i__i_1=___src__2sS_1.__i__i_1));
-    return ((struct S )___src__2sS_1);
+    ((void)___constructor__F_P2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
+    return ((struct S )___ret__2sS_1);
 }
 static inline void ___constructor__F_P2sSi_autogen___1(struct S *___dst__P2sS_1, int __i__i_1){
Index: src/tests/.expect/32/attributes.txt
===================================================================
--- src/tests/.expect/32/attributes.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/32/attributes.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -22,5 +22,7 @@
 }
 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
-    return ((struct __anonymous0 )___src__13s__anonymous0_1);
+    struct __anonymous0 ___ret__13s__anonymous0_1;
+    ((void)___constructor__F_P13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
+    return ((struct __anonymous0 )___ret__13s__anonymous0_1);
 }
 __attribute__ ((unused)) struct Agn1;
@@ -38,5 +40,7 @@
 }
 static inline struct Agn2 ___operator_assign__F5sAgn2_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1){
-    return ((struct Agn2 )___src__5sAgn2_1);
+    struct Agn2 ___ret__5sAgn2_1;
+    ((void)___constructor__F_P5sAgn25sAgn2_autogen___1((&___ret__5sAgn2_1), ___src__5sAgn2_1));
+    return ((struct Agn2 )___ret__5sAgn2_1);
 }
 enum __attribute__ ((unused)) __anonymous1 {
@@ -99,4 +103,5 @@
 }
 static inline struct Fdl ___operator_assign__F4sFdl_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1){
+    struct Fdl ___ret__4sFdl_1;
     ((void)((*___dst__P4sFdl_1).__f1__i_1=___src__4sFdl_1.__f1__i_1));
     ((void)((*___dst__P4sFdl_1).__f2__i_1=___src__4sFdl_1.__f2__i_1));
@@ -108,5 +113,6 @@
     ((void)((*___dst__P4sFdl_1).__f8__i_1=___src__4sFdl_1.__f8__i_1));
     ((void)((*___dst__P4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1));
-    return ((struct Fdl )___src__4sFdl_1);
+    ((void)___constructor__F_P4sFdl4sFdl_autogen___1((&___ret__4sFdl_1), ___src__4sFdl_1));
+    return ((struct Fdl )___ret__4sFdl_1);
 }
 static inline void ___constructor__F_P4sFdli_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1){
@@ -292,6 +298,8 @@
     }
     inline struct __anonymous4 ___operator_assign__F13s__anonymous4_P13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){
+        struct __anonymous4 ___ret__13s__anonymous4_2;
         ((void)((*___dst__P13s__anonymous4_2).__i__i_2=___src__13s__anonymous4_2.__i__i_2));
-        return ((struct __anonymous4 )___src__13s__anonymous4_2);
+        ((void)___constructor__F_P13s__anonymous413s__anonymous4_autogen___2((&___ret__13s__anonymous4_2), ___src__13s__anonymous4_2));
+        return ((struct __anonymous4 )___ret__13s__anonymous4_2);
     }
     inline void ___constructor__F_P13s__anonymous4i_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, int __i__i_2){
@@ -310,5 +318,7 @@
     }
     inline enum __anonymous5 ___operator_assign__F13e__anonymous5_P13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){
-        return ((enum __anonymous5 )((*___dst__P13e__anonymous5_2)=___src__13e__anonymous5_2));
+        enum __anonymous5 ___ret__13e__anonymous5_2;
+        ((void)(___ret__13e__anonymous5_2=((*___dst__P13e__anonymous5_2)=___src__13e__anonymous5_2)) /* ?{} */);
+        return ((enum __anonymous5 )___ret__13e__anonymous5_2);
     }
     ((void)sizeof(enum __anonymous5 ));
@@ -338,4 +348,6 @@
 }
 static inline struct Vad ___operator_assign__F4sVad_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1){
-    return ((struct Vad )___src__4sVad_1);
-}
+    struct Vad ___ret__4sVad_1;
+    ((void)___constructor__F_P4sVad4sVad_autogen___1((&___ret__4sVad_1), ___src__4sVad_1));
+    return ((struct Vad )___ret__4sVad_1);
+}
Index: src/tests/.expect/32/declarationSpecifier.txt
===================================================================
--- src/tests/.expect/32/declarationSpecifier.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/32/declarationSpecifier.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -30,6 +30,8 @@
 }
 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
+    struct __anonymous0 ___ret__13s__anonymous0_1;
     ((void)((*___dst__P13s__anonymous0_1).__i__i_1=___src__13s__anonymous0_1.__i__i_1));
-    return ((struct __anonymous0 )___src__13s__anonymous0_1);
+    ((void)___constructor__F_P13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
+    return ((struct __anonymous0 )___ret__13s__anonymous0_1);
 }
 static inline void ___constructor__F_P13s__anonymous0i_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, int __i__i_1){
@@ -54,6 +56,8 @@
 }
 static inline struct __anonymous1 ___operator_assign__F13s__anonymous1_P13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1){
+    struct __anonymous1 ___ret__13s__anonymous1_1;
     ((void)((*___dst__P13s__anonymous1_1).__i__i_1=___src__13s__anonymous1_1.__i__i_1));
-    return ((struct __anonymous1 )___src__13s__anonymous1_1);
+    ((void)___constructor__F_P13s__anonymous113s__anonymous1_autogen___1((&___ret__13s__anonymous1_1), ___src__13s__anonymous1_1));
+    return ((struct __anonymous1 )___ret__13s__anonymous1_1);
 }
 static inline void ___constructor__F_P13s__anonymous1i_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, int __i__i_1){
@@ -78,6 +82,8 @@
 }
 static inline struct __anonymous2 ___operator_assign__F13s__anonymous2_P13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1){
+    struct __anonymous2 ___ret__13s__anonymous2_1;
     ((void)((*___dst__P13s__anonymous2_1).__i__i_1=___src__13s__anonymous2_1.__i__i_1));
-    return ((struct __anonymous2 )___src__13s__anonymous2_1);
+    ((void)___constructor__F_P13s__anonymous213s__anonymous2_autogen___1((&___ret__13s__anonymous2_1), ___src__13s__anonymous2_1));
+    return ((struct __anonymous2 )___ret__13s__anonymous2_1);
 }
 static inline void ___constructor__F_P13s__anonymous2i_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, int __i__i_1){
@@ -102,6 +108,8 @@
 }
 static inline struct __anonymous3 ___operator_assign__F13s__anonymous3_P13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1){
+    struct __anonymous3 ___ret__13s__anonymous3_1;
     ((void)((*___dst__P13s__anonymous3_1).__i__i_1=___src__13s__anonymous3_1.__i__i_1));
-    return ((struct __anonymous3 )___src__13s__anonymous3_1);
+    ((void)___constructor__F_P13s__anonymous313s__anonymous3_autogen___1((&___ret__13s__anonymous3_1), ___src__13s__anonymous3_1));
+    return ((struct __anonymous3 )___ret__13s__anonymous3_1);
 }
 static inline void ___constructor__F_P13s__anonymous3i_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, int __i__i_1){
@@ -126,6 +134,8 @@
 }
 static inline struct __anonymous4 ___operator_assign__F13s__anonymous4_P13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1){
+    struct __anonymous4 ___ret__13s__anonymous4_1;
     ((void)((*___dst__P13s__anonymous4_1).__i__i_1=___src__13s__anonymous4_1.__i__i_1));
-    return ((struct __anonymous4 )___src__13s__anonymous4_1);
+    ((void)___constructor__F_P13s__anonymous413s__anonymous4_autogen___1((&___ret__13s__anonymous4_1), ___src__13s__anonymous4_1));
+    return ((struct __anonymous4 )___ret__13s__anonymous4_1);
 }
 static inline void ___constructor__F_P13s__anonymous4i_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, int __i__i_1){
@@ -150,6 +160,8 @@
 }
 static inline struct __anonymous5 ___operator_assign__F13s__anonymous5_P13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1){
+    struct __anonymous5 ___ret__13s__anonymous5_1;
     ((void)((*___dst__P13s__anonymous5_1).__i__i_1=___src__13s__anonymous5_1.__i__i_1));
-    return ((struct __anonymous5 )___src__13s__anonymous5_1);
+    ((void)___constructor__F_P13s__anonymous513s__anonymous5_autogen___1((&___ret__13s__anonymous5_1), ___src__13s__anonymous5_1));
+    return ((struct __anonymous5 )___ret__13s__anonymous5_1);
 }
 static inline void ___constructor__F_P13s__anonymous5i_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, int __i__i_1){
@@ -174,6 +186,8 @@
 }
 static inline struct __anonymous6 ___operator_assign__F13s__anonymous6_P13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1){
+    struct __anonymous6 ___ret__13s__anonymous6_1;
     ((void)((*___dst__P13s__anonymous6_1).__i__i_1=___src__13s__anonymous6_1.__i__i_1));
-    return ((struct __anonymous6 )___src__13s__anonymous6_1);
+    ((void)___constructor__F_P13s__anonymous613s__anonymous6_autogen___1((&___ret__13s__anonymous6_1), ___src__13s__anonymous6_1));
+    return ((struct __anonymous6 )___ret__13s__anonymous6_1);
 }
 static inline void ___constructor__F_P13s__anonymous6i_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, int __i__i_1){
@@ -198,6 +212,8 @@
 }
 static inline struct __anonymous7 ___operator_assign__F13s__anonymous7_P13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1){
+    struct __anonymous7 ___ret__13s__anonymous7_1;
     ((void)((*___dst__P13s__anonymous7_1).__i__i_1=___src__13s__anonymous7_1.__i__i_1));
-    return ((struct __anonymous7 )___src__13s__anonymous7_1);
+    ((void)___constructor__F_P13s__anonymous713s__anonymous7_autogen___1((&___ret__13s__anonymous7_1), ___src__13s__anonymous7_1));
+    return ((struct __anonymous7 )___ret__13s__anonymous7_1);
 }
 static inline void ___constructor__F_P13s__anonymous7i_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, int __i__i_1){
@@ -230,6 +246,8 @@
 }
 static inline struct __anonymous8 ___operator_assign__F13s__anonymous8_P13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1){
+    struct __anonymous8 ___ret__13s__anonymous8_1;
     ((void)((*___dst__P13s__anonymous8_1).__i__s_1=___src__13s__anonymous8_1.__i__s_1));
-    return ((struct __anonymous8 )___src__13s__anonymous8_1);
+    ((void)___constructor__F_P13s__anonymous813s__anonymous8_autogen___1((&___ret__13s__anonymous8_1), ___src__13s__anonymous8_1));
+    return ((struct __anonymous8 )___ret__13s__anonymous8_1);
 }
 static inline void ___constructor__F_P13s__anonymous8s_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, short __i__s_1){
@@ -254,6 +272,8 @@
 }
 static inline struct __anonymous9 ___operator_assign__F13s__anonymous9_P13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1){
+    struct __anonymous9 ___ret__13s__anonymous9_1;
     ((void)((*___dst__P13s__anonymous9_1).__i__s_1=___src__13s__anonymous9_1.__i__s_1));
-    return ((struct __anonymous9 )___src__13s__anonymous9_1);
+    ((void)___constructor__F_P13s__anonymous913s__anonymous9_autogen___1((&___ret__13s__anonymous9_1), ___src__13s__anonymous9_1));
+    return ((struct __anonymous9 )___ret__13s__anonymous9_1);
 }
 static inline void ___constructor__F_P13s__anonymous9s_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, short __i__s_1){
@@ -278,6 +298,8 @@
 }
 static inline struct __anonymous10 ___operator_assign__F14s__anonymous10_P14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1){
+    struct __anonymous10 ___ret__14s__anonymous10_1;
     ((void)((*___dst__P14s__anonymous10_1).__i__s_1=___src__14s__anonymous10_1.__i__s_1));
-    return ((struct __anonymous10 )___src__14s__anonymous10_1);
+    ((void)___constructor__F_P14s__anonymous1014s__anonymous10_autogen___1((&___ret__14s__anonymous10_1), ___src__14s__anonymous10_1));
+    return ((struct __anonymous10 )___ret__14s__anonymous10_1);
 }
 static inline void ___constructor__F_P14s__anonymous10s_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, short __i__s_1){
@@ -302,6 +324,8 @@
 }
 static inline struct __anonymous11 ___operator_assign__F14s__anonymous11_P14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1){
+    struct __anonymous11 ___ret__14s__anonymous11_1;
     ((void)((*___dst__P14s__anonymous11_1).__i__s_1=___src__14s__anonymous11_1.__i__s_1));
-    return ((struct __anonymous11 )___src__14s__anonymous11_1);
+    ((void)___constructor__F_P14s__anonymous1114s__anonymous11_autogen___1((&___ret__14s__anonymous11_1), ___src__14s__anonymous11_1));
+    return ((struct __anonymous11 )___ret__14s__anonymous11_1);
 }
 static inline void ___constructor__F_P14s__anonymous11s_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, short __i__s_1){
@@ -326,6 +350,8 @@
 }
 static inline struct __anonymous12 ___operator_assign__F14s__anonymous12_P14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1){
+    struct __anonymous12 ___ret__14s__anonymous12_1;
     ((void)((*___dst__P14s__anonymous12_1).__i__s_1=___src__14s__anonymous12_1.__i__s_1));
-    return ((struct __anonymous12 )___src__14s__anonymous12_1);
+    ((void)___constructor__F_P14s__anonymous1214s__anonymous12_autogen___1((&___ret__14s__anonymous12_1), ___src__14s__anonymous12_1));
+    return ((struct __anonymous12 )___ret__14s__anonymous12_1);
 }
 static inline void ___constructor__F_P14s__anonymous12s_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, short __i__s_1){
@@ -350,6 +376,8 @@
 }
 static inline struct __anonymous13 ___operator_assign__F14s__anonymous13_P14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1){
+    struct __anonymous13 ___ret__14s__anonymous13_1;
     ((void)((*___dst__P14s__anonymous13_1).__i__s_1=___src__14s__anonymous13_1.__i__s_1));
-    return ((struct __anonymous13 )___src__14s__anonymous13_1);
+    ((void)___constructor__F_P14s__anonymous1314s__anonymous13_autogen___1((&___ret__14s__anonymous13_1), ___src__14s__anonymous13_1));
+    return ((struct __anonymous13 )___ret__14s__anonymous13_1);
 }
 static inline void ___constructor__F_P14s__anonymous13s_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, short __i__s_1){
@@ -374,6 +402,8 @@
 }
 static inline struct __anonymous14 ___operator_assign__F14s__anonymous14_P14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1){
+    struct __anonymous14 ___ret__14s__anonymous14_1;
     ((void)((*___dst__P14s__anonymous14_1).__i__s_1=___src__14s__anonymous14_1.__i__s_1));
-    return ((struct __anonymous14 )___src__14s__anonymous14_1);
+    ((void)___constructor__F_P14s__anonymous1414s__anonymous14_autogen___1((&___ret__14s__anonymous14_1), ___src__14s__anonymous14_1));
+    return ((struct __anonymous14 )___ret__14s__anonymous14_1);
 }
 static inline void ___constructor__F_P14s__anonymous14s_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, short __i__s_1){
@@ -398,6 +428,8 @@
 }
 static inline struct __anonymous15 ___operator_assign__F14s__anonymous15_P14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1){
+    struct __anonymous15 ___ret__14s__anonymous15_1;
     ((void)((*___dst__P14s__anonymous15_1).__i__s_1=___src__14s__anonymous15_1.__i__s_1));
-    return ((struct __anonymous15 )___src__14s__anonymous15_1);
+    ((void)___constructor__F_P14s__anonymous1514s__anonymous15_autogen___1((&___ret__14s__anonymous15_1), ___src__14s__anonymous15_1));
+    return ((struct __anonymous15 )___ret__14s__anonymous15_1);
 }
 static inline void ___constructor__F_P14s__anonymous15s_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, short __i__s_1){
@@ -438,6 +470,8 @@
 }
 static inline struct __anonymous16 ___operator_assign__F14s__anonymous16_P14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1){
+    struct __anonymous16 ___ret__14s__anonymous16_1;
     ((void)((*___dst__P14s__anonymous16_1).__i__i_1=___src__14s__anonymous16_1.__i__i_1));
-    return ((struct __anonymous16 )___src__14s__anonymous16_1);
+    ((void)___constructor__F_P14s__anonymous1614s__anonymous16_autogen___1((&___ret__14s__anonymous16_1), ___src__14s__anonymous16_1));
+    return ((struct __anonymous16 )___ret__14s__anonymous16_1);
 }
 static inline void ___constructor__F_P14s__anonymous16i_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, int __i__i_1){
@@ -462,6 +496,8 @@
 }
 static inline struct __anonymous17 ___operator_assign__F14s__anonymous17_P14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1){
+    struct __anonymous17 ___ret__14s__anonymous17_1;
     ((void)((*___dst__P14s__anonymous17_1).__i__i_1=___src__14s__anonymous17_1.__i__i_1));
-    return ((struct __anonymous17 )___src__14s__anonymous17_1);
+    ((void)___constructor__F_P14s__anonymous1714s__anonymous17_autogen___1((&___ret__14s__anonymous17_1), ___src__14s__anonymous17_1));
+    return ((struct __anonymous17 )___ret__14s__anonymous17_1);
 }
 static inline void ___constructor__F_P14s__anonymous17i_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, int __i__i_1){
@@ -486,6 +522,8 @@
 }
 static inline struct __anonymous18 ___operator_assign__F14s__anonymous18_P14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1){
+    struct __anonymous18 ___ret__14s__anonymous18_1;
     ((void)((*___dst__P14s__anonymous18_1).__i__i_1=___src__14s__anonymous18_1.__i__i_1));
-    return ((struct __anonymous18 )___src__14s__anonymous18_1);
+    ((void)___constructor__F_P14s__anonymous1814s__anonymous18_autogen___1((&___ret__14s__anonymous18_1), ___src__14s__anonymous18_1));
+    return ((struct __anonymous18 )___ret__14s__anonymous18_1);
 }
 static inline void ___constructor__F_P14s__anonymous18i_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, int __i__i_1){
@@ -510,6 +548,8 @@
 }
 static inline struct __anonymous19 ___operator_assign__F14s__anonymous19_P14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1){
+    struct __anonymous19 ___ret__14s__anonymous19_1;
     ((void)((*___dst__P14s__anonymous19_1).__i__i_1=___src__14s__anonymous19_1.__i__i_1));
-    return ((struct __anonymous19 )___src__14s__anonymous19_1);
+    ((void)___constructor__F_P14s__anonymous1914s__anonymous19_autogen___1((&___ret__14s__anonymous19_1), ___src__14s__anonymous19_1));
+    return ((struct __anonymous19 )___ret__14s__anonymous19_1);
 }
 static inline void ___constructor__F_P14s__anonymous19i_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, int __i__i_1){
@@ -534,6 +574,8 @@
 }
 static inline struct __anonymous20 ___operator_assign__F14s__anonymous20_P14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1){
+    struct __anonymous20 ___ret__14s__anonymous20_1;
     ((void)((*___dst__P14s__anonymous20_1).__i__i_1=___src__14s__anonymous20_1.__i__i_1));
-    return ((struct __anonymous20 )___src__14s__anonymous20_1);
+    ((void)___constructor__F_P14s__anonymous2014s__anonymous20_autogen___1((&___ret__14s__anonymous20_1), ___src__14s__anonymous20_1));
+    return ((struct __anonymous20 )___ret__14s__anonymous20_1);
 }
 static inline void ___constructor__F_P14s__anonymous20i_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, int __i__i_1){
@@ -558,6 +600,8 @@
 }
 static inline struct __anonymous21 ___operator_assign__F14s__anonymous21_P14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1){
+    struct __anonymous21 ___ret__14s__anonymous21_1;
     ((void)((*___dst__P14s__anonymous21_1).__i__i_1=___src__14s__anonymous21_1.__i__i_1));
-    return ((struct __anonymous21 )___src__14s__anonymous21_1);
+    ((void)___constructor__F_P14s__anonymous2114s__anonymous21_autogen___1((&___ret__14s__anonymous21_1), ___src__14s__anonymous21_1));
+    return ((struct __anonymous21 )___ret__14s__anonymous21_1);
 }
 static inline void ___constructor__F_P14s__anonymous21i_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, int __i__i_1){
@@ -582,6 +626,8 @@
 }
 static inline struct __anonymous22 ___operator_assign__F14s__anonymous22_P14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1){
+    struct __anonymous22 ___ret__14s__anonymous22_1;
     ((void)((*___dst__P14s__anonymous22_1).__i__i_1=___src__14s__anonymous22_1.__i__i_1));
-    return ((struct __anonymous22 )___src__14s__anonymous22_1);
+    ((void)___constructor__F_P14s__anonymous2214s__anonymous22_autogen___1((&___ret__14s__anonymous22_1), ___src__14s__anonymous22_1));
+    return ((struct __anonymous22 )___ret__14s__anonymous22_1);
 }
 static inline void ___constructor__F_P14s__anonymous22i_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, int __i__i_1){
@@ -606,6 +652,8 @@
 }
 static inline struct __anonymous23 ___operator_assign__F14s__anonymous23_P14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1){
+    struct __anonymous23 ___ret__14s__anonymous23_1;
     ((void)((*___dst__P14s__anonymous23_1).__i__i_1=___src__14s__anonymous23_1.__i__i_1));
-    return ((struct __anonymous23 )___src__14s__anonymous23_1);
+    ((void)___constructor__F_P14s__anonymous2314s__anonymous23_autogen___1((&___ret__14s__anonymous23_1), ___src__14s__anonymous23_1));
+    return ((struct __anonymous23 )___ret__14s__anonymous23_1);
 }
 static inline void ___constructor__F_P14s__anonymous23i_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, int __i__i_1){
Index: src/tests/.expect/32/extension.txt
===================================================================
--- src/tests/.expect/32/extension.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/32/extension.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -33,8 +33,10 @@
 }
 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
+    struct S ___ret__2sS_1;
     ((void)((*___dst__P2sS_1).__a__i_1=___src__2sS_1.__a__i_1));
     ((void)((*___dst__P2sS_1).__b__i_1=___src__2sS_1.__b__i_1));
     ((void)((*___dst__P2sS_1).__c__i_1=___src__2sS_1.__c__i_1));
-    return ((struct S )___src__2sS_1);
+    ((void)___constructor__F_P2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
+    return ((struct S )___ret__2sS_1);
 }
 static inline void ___constructor__F_P2sSi_autogen___1(struct S *___dst__P2sS_1, int __a__i_1){
@@ -66,6 +68,8 @@
 }
 static inline union U ___operator_assign__F2uU_P2uU2uU_autogen___1(union U *___dst__P2uU_1, union U ___src__2uU_1){
+    union U ___ret__2uU_1;
     ((void)__builtin_memcpy(((void *)___dst__P2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U )));
-    return ((union U )___src__2uU_1);
+    ((void)___constructor__F_P2uU2uU_autogen___1((&___ret__2uU_1), ___src__2uU_1));
+    return ((union U )___ret__2uU_1);
 }
 static inline void ___constructor__F_P2uUi_autogen___1(union U *___dst__P2uU_1, int __src__i_1){
Index: src/tests/.expect/32/gccExtensions.txt
===================================================================
--- src/tests/.expect/32/gccExtensions.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/32/gccExtensions.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -59,8 +59,10 @@
     }
     inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___2(struct S *___dst__P2sS_2, struct S ___src__2sS_2){
+        struct S ___ret__2sS_2;
         ((void)((*___dst__P2sS_2).__a__i_2=___src__2sS_2.__a__i_2));
         ((void)((*___dst__P2sS_2).__b__i_2=___src__2sS_2.__b__i_2));
         ((void)((*___dst__P2sS_2).__c__i_2=___src__2sS_2.__c__i_2));
-        return ((struct S )___src__2sS_2);
+        ((void)___constructor__F_P2sS2sS_autogen___2((&___ret__2sS_2), ___src__2sS_2));
+        return ((struct S )___ret__2sS_2);
     }
     inline void ___constructor__F_P2sSi_autogen___2(struct S *___dst__P2sS_2, int __a__i_2){
@@ -109,6 +111,8 @@
     }
     inline struct s2 ___operator_assign__F3ss2_P3ss23ss2_autogen___2(struct s2 *___dst__P3ss2_2, struct s2 ___src__3ss2_2){
+        struct s2 ___ret__3ss2_2;
         ((void)((*___dst__P3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2));
-        return ((struct s2 )___src__3ss2_2);
+        ((void)___constructor__F_P3ss23ss2_autogen___2((&___ret__3ss2_2), ___src__3ss2_2));
+        return ((struct s2 )___ret__3ss2_2);
     }
     inline void ___constructor__F_P3ss2i_autogen___2(struct s2 *___dst__P3ss2_2, int __i__i_2){
@@ -128,6 +132,8 @@
     }
     inline struct s3 ___operator_assign__F3ss3_P3ss33ss3_autogen___2(struct s3 *___dst__P3ss3_2, struct s3 ___src__3ss3_2){
+        struct s3 ___ret__3ss3_2;
         ((void)((*___dst__P3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2));
-        return ((struct s3 )___src__3ss3_2);
+        ((void)___constructor__F_P3ss33ss3_autogen___2((&___ret__3ss3_2), ___src__3ss3_2));
+        return ((struct s3 )___ret__3ss3_2);
     }
     inline void ___constructor__F_P3ss3i_autogen___2(struct s3 *___dst__P3ss3_2, int __i__i_2){
@@ -149,6 +155,8 @@
     }
     inline struct s4 ___operator_assign__F3ss4_P3ss43ss4_autogen___2(struct s4 *___dst__P3ss4_2, struct s4 ___src__3ss4_2){
+        struct s4 ___ret__3ss4_2;
         ((void)((*___dst__P3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2));
-        return ((struct s4 )___src__3ss4_2);
+        ((void)___constructor__F_P3ss43ss4_autogen___2((&___ret__3ss4_2), ___src__3ss4_2));
+        return ((struct s4 )___ret__3ss4_2);
     }
     inline void ___constructor__F_P3ss4i_autogen___2(struct s4 *___dst__P3ss4_2, int __i__i_2){
Index: src/tests/.expect/64/KRfunctions.txt
===================================================================
--- src/tests/.expect/64/KRfunctions.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/64/KRfunctions.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -31,6 +31,8 @@
 }
 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
+    struct S ___ret__2sS_1;
     ((void)((*___dst__P2sS_1).__i__i_1=___src__2sS_1.__i__i_1));
-    return ((struct S )___src__2sS_1);
+    ((void)___constructor__F_P2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
+    return ((struct S )___ret__2sS_1);
 }
 static inline void ___constructor__F_P2sSi_autogen___1(struct S *___dst__P2sS_1, int __i__i_1){
Index: src/tests/.expect/64/attributes.txt
===================================================================
--- src/tests/.expect/64/attributes.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/64/attributes.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -22,5 +22,7 @@
 }
 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
-    return ((struct __anonymous0 )___src__13s__anonymous0_1);
+    struct __anonymous0 ___ret__13s__anonymous0_1;
+    ((void)___constructor__F_P13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
+    return ((struct __anonymous0 )___ret__13s__anonymous0_1);
 }
 __attribute__ ((unused)) struct Agn1;
@@ -38,5 +40,7 @@
 }
 static inline struct Agn2 ___operator_assign__F5sAgn2_P5sAgn25sAgn2_autogen___1(struct Agn2 *___dst__P5sAgn2_1, struct Agn2 ___src__5sAgn2_1){
-    return ((struct Agn2 )___src__5sAgn2_1);
+    struct Agn2 ___ret__5sAgn2_1;
+    ((void)___constructor__F_P5sAgn25sAgn2_autogen___1((&___ret__5sAgn2_1), ___src__5sAgn2_1));
+    return ((struct Agn2 )___ret__5sAgn2_1);
 }
 enum __attribute__ ((unused)) __anonymous1 {
@@ -99,4 +103,5 @@
 }
 static inline struct Fdl ___operator_assign__F4sFdl_P4sFdl4sFdl_autogen___1(struct Fdl *___dst__P4sFdl_1, struct Fdl ___src__4sFdl_1){
+    struct Fdl ___ret__4sFdl_1;
     ((void)((*___dst__P4sFdl_1).__f1__i_1=___src__4sFdl_1.__f1__i_1));
     ((void)((*___dst__P4sFdl_1).__f2__i_1=___src__4sFdl_1.__f2__i_1));
@@ -108,5 +113,6 @@
     ((void)((*___dst__P4sFdl_1).__f8__i_1=___src__4sFdl_1.__f8__i_1));
     ((void)((*___dst__P4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1));
-    return ((struct Fdl )___src__4sFdl_1);
+    ((void)___constructor__F_P4sFdl4sFdl_autogen___1((&___ret__4sFdl_1), ___src__4sFdl_1));
+    return ((struct Fdl )___ret__4sFdl_1);
 }
 static inline void ___constructor__F_P4sFdli_autogen___1(struct Fdl *___dst__P4sFdl_1, int __f1__i_1){
@@ -292,6 +298,8 @@
     }
     inline struct __anonymous4 ___operator_assign__F13s__anonymous4_P13s__anonymous413s__anonymous4_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, struct __anonymous4 ___src__13s__anonymous4_2){
+        struct __anonymous4 ___ret__13s__anonymous4_2;
         ((void)((*___dst__P13s__anonymous4_2).__i__i_2=___src__13s__anonymous4_2.__i__i_2));
-        return ((struct __anonymous4 )___src__13s__anonymous4_2);
+        ((void)___constructor__F_P13s__anonymous413s__anonymous4_autogen___2((&___ret__13s__anonymous4_2), ___src__13s__anonymous4_2));
+        return ((struct __anonymous4 )___ret__13s__anonymous4_2);
     }
     inline void ___constructor__F_P13s__anonymous4i_autogen___2(struct __anonymous4 *___dst__P13s__anonymous4_2, int __i__i_2){
@@ -310,5 +318,7 @@
     }
     inline enum __anonymous5 ___operator_assign__F13e__anonymous5_P13e__anonymous513e__anonymous5_intrinsic___2(enum __anonymous5 *___dst__P13e__anonymous5_2, enum __anonymous5 ___src__13e__anonymous5_2){
-        return ((enum __anonymous5 )((*___dst__P13e__anonymous5_2)=___src__13e__anonymous5_2));
+        enum __anonymous5 ___ret__13e__anonymous5_2;
+        ((void)(___ret__13e__anonymous5_2=((*___dst__P13e__anonymous5_2)=___src__13e__anonymous5_2)) /* ?{} */);
+        return ((enum __anonymous5 )___ret__13e__anonymous5_2);
     }
     ((void)sizeof(enum __anonymous5 ));
@@ -338,4 +348,6 @@
 }
 static inline struct Vad ___operator_assign__F4sVad_P4sVad4sVad_autogen___1(struct Vad *___dst__P4sVad_1, struct Vad ___src__4sVad_1){
-    return ((struct Vad )___src__4sVad_1);
-}
+    struct Vad ___ret__4sVad_1;
+    ((void)___constructor__F_P4sVad4sVad_autogen___1((&___ret__4sVad_1), ___src__4sVad_1));
+    return ((struct Vad )___ret__4sVad_1);
+}
Index: src/tests/.expect/64/declarationSpecifier.txt
===================================================================
--- src/tests/.expect/64/declarationSpecifier.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/64/declarationSpecifier.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -30,6 +30,8 @@
 }
 static inline struct __anonymous0 ___operator_assign__F13s__anonymous0_P13s__anonymous013s__anonymous0_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, struct __anonymous0 ___src__13s__anonymous0_1){
+    struct __anonymous0 ___ret__13s__anonymous0_1;
     ((void)((*___dst__P13s__anonymous0_1).__i__i_1=___src__13s__anonymous0_1.__i__i_1));
-    return ((struct __anonymous0 )___src__13s__anonymous0_1);
+    ((void)___constructor__F_P13s__anonymous013s__anonymous0_autogen___1((&___ret__13s__anonymous0_1), ___src__13s__anonymous0_1));
+    return ((struct __anonymous0 )___ret__13s__anonymous0_1);
 }
 static inline void ___constructor__F_P13s__anonymous0i_autogen___1(struct __anonymous0 *___dst__P13s__anonymous0_1, int __i__i_1){
@@ -54,6 +56,8 @@
 }
 static inline struct __anonymous1 ___operator_assign__F13s__anonymous1_P13s__anonymous113s__anonymous1_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, struct __anonymous1 ___src__13s__anonymous1_1){
+    struct __anonymous1 ___ret__13s__anonymous1_1;
     ((void)((*___dst__P13s__anonymous1_1).__i__i_1=___src__13s__anonymous1_1.__i__i_1));
-    return ((struct __anonymous1 )___src__13s__anonymous1_1);
+    ((void)___constructor__F_P13s__anonymous113s__anonymous1_autogen___1((&___ret__13s__anonymous1_1), ___src__13s__anonymous1_1));
+    return ((struct __anonymous1 )___ret__13s__anonymous1_1);
 }
 static inline void ___constructor__F_P13s__anonymous1i_autogen___1(struct __anonymous1 *___dst__P13s__anonymous1_1, int __i__i_1){
@@ -78,6 +82,8 @@
 }
 static inline struct __anonymous2 ___operator_assign__F13s__anonymous2_P13s__anonymous213s__anonymous2_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, struct __anonymous2 ___src__13s__anonymous2_1){
+    struct __anonymous2 ___ret__13s__anonymous2_1;
     ((void)((*___dst__P13s__anonymous2_1).__i__i_1=___src__13s__anonymous2_1.__i__i_1));
-    return ((struct __anonymous2 )___src__13s__anonymous2_1);
+    ((void)___constructor__F_P13s__anonymous213s__anonymous2_autogen___1((&___ret__13s__anonymous2_1), ___src__13s__anonymous2_1));
+    return ((struct __anonymous2 )___ret__13s__anonymous2_1);
 }
 static inline void ___constructor__F_P13s__anonymous2i_autogen___1(struct __anonymous2 *___dst__P13s__anonymous2_1, int __i__i_1){
@@ -102,6 +108,8 @@
 }
 static inline struct __anonymous3 ___operator_assign__F13s__anonymous3_P13s__anonymous313s__anonymous3_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, struct __anonymous3 ___src__13s__anonymous3_1){
+    struct __anonymous3 ___ret__13s__anonymous3_1;
     ((void)((*___dst__P13s__anonymous3_1).__i__i_1=___src__13s__anonymous3_1.__i__i_1));
-    return ((struct __anonymous3 )___src__13s__anonymous3_1);
+    ((void)___constructor__F_P13s__anonymous313s__anonymous3_autogen___1((&___ret__13s__anonymous3_1), ___src__13s__anonymous3_1));
+    return ((struct __anonymous3 )___ret__13s__anonymous3_1);
 }
 static inline void ___constructor__F_P13s__anonymous3i_autogen___1(struct __anonymous3 *___dst__P13s__anonymous3_1, int __i__i_1){
@@ -126,6 +134,8 @@
 }
 static inline struct __anonymous4 ___operator_assign__F13s__anonymous4_P13s__anonymous413s__anonymous4_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, struct __anonymous4 ___src__13s__anonymous4_1){
+    struct __anonymous4 ___ret__13s__anonymous4_1;
     ((void)((*___dst__P13s__anonymous4_1).__i__i_1=___src__13s__anonymous4_1.__i__i_1));
-    return ((struct __anonymous4 )___src__13s__anonymous4_1);
+    ((void)___constructor__F_P13s__anonymous413s__anonymous4_autogen___1((&___ret__13s__anonymous4_1), ___src__13s__anonymous4_1));
+    return ((struct __anonymous4 )___ret__13s__anonymous4_1);
 }
 static inline void ___constructor__F_P13s__anonymous4i_autogen___1(struct __anonymous4 *___dst__P13s__anonymous4_1, int __i__i_1){
@@ -150,6 +160,8 @@
 }
 static inline struct __anonymous5 ___operator_assign__F13s__anonymous5_P13s__anonymous513s__anonymous5_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, struct __anonymous5 ___src__13s__anonymous5_1){
+    struct __anonymous5 ___ret__13s__anonymous5_1;
     ((void)((*___dst__P13s__anonymous5_1).__i__i_1=___src__13s__anonymous5_1.__i__i_1));
-    return ((struct __anonymous5 )___src__13s__anonymous5_1);
+    ((void)___constructor__F_P13s__anonymous513s__anonymous5_autogen___1((&___ret__13s__anonymous5_1), ___src__13s__anonymous5_1));
+    return ((struct __anonymous5 )___ret__13s__anonymous5_1);
 }
 static inline void ___constructor__F_P13s__anonymous5i_autogen___1(struct __anonymous5 *___dst__P13s__anonymous5_1, int __i__i_1){
@@ -174,6 +186,8 @@
 }
 static inline struct __anonymous6 ___operator_assign__F13s__anonymous6_P13s__anonymous613s__anonymous6_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, struct __anonymous6 ___src__13s__anonymous6_1){
+    struct __anonymous6 ___ret__13s__anonymous6_1;
     ((void)((*___dst__P13s__anonymous6_1).__i__i_1=___src__13s__anonymous6_1.__i__i_1));
-    return ((struct __anonymous6 )___src__13s__anonymous6_1);
+    ((void)___constructor__F_P13s__anonymous613s__anonymous6_autogen___1((&___ret__13s__anonymous6_1), ___src__13s__anonymous6_1));
+    return ((struct __anonymous6 )___ret__13s__anonymous6_1);
 }
 static inline void ___constructor__F_P13s__anonymous6i_autogen___1(struct __anonymous6 *___dst__P13s__anonymous6_1, int __i__i_1){
@@ -198,6 +212,8 @@
 }
 static inline struct __anonymous7 ___operator_assign__F13s__anonymous7_P13s__anonymous713s__anonymous7_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, struct __anonymous7 ___src__13s__anonymous7_1){
+    struct __anonymous7 ___ret__13s__anonymous7_1;
     ((void)((*___dst__P13s__anonymous7_1).__i__i_1=___src__13s__anonymous7_1.__i__i_1));
-    return ((struct __anonymous7 )___src__13s__anonymous7_1);
+    ((void)___constructor__F_P13s__anonymous713s__anonymous7_autogen___1((&___ret__13s__anonymous7_1), ___src__13s__anonymous7_1));
+    return ((struct __anonymous7 )___ret__13s__anonymous7_1);
 }
 static inline void ___constructor__F_P13s__anonymous7i_autogen___1(struct __anonymous7 *___dst__P13s__anonymous7_1, int __i__i_1){
@@ -230,6 +246,8 @@
 }
 static inline struct __anonymous8 ___operator_assign__F13s__anonymous8_P13s__anonymous813s__anonymous8_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, struct __anonymous8 ___src__13s__anonymous8_1){
+    struct __anonymous8 ___ret__13s__anonymous8_1;
     ((void)((*___dst__P13s__anonymous8_1).__i__s_1=___src__13s__anonymous8_1.__i__s_1));
-    return ((struct __anonymous8 )___src__13s__anonymous8_1);
+    ((void)___constructor__F_P13s__anonymous813s__anonymous8_autogen___1((&___ret__13s__anonymous8_1), ___src__13s__anonymous8_1));
+    return ((struct __anonymous8 )___ret__13s__anonymous8_1);
 }
 static inline void ___constructor__F_P13s__anonymous8s_autogen___1(struct __anonymous8 *___dst__P13s__anonymous8_1, short __i__s_1){
@@ -254,6 +272,8 @@
 }
 static inline struct __anonymous9 ___operator_assign__F13s__anonymous9_P13s__anonymous913s__anonymous9_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, struct __anonymous9 ___src__13s__anonymous9_1){
+    struct __anonymous9 ___ret__13s__anonymous9_1;
     ((void)((*___dst__P13s__anonymous9_1).__i__s_1=___src__13s__anonymous9_1.__i__s_1));
-    return ((struct __anonymous9 )___src__13s__anonymous9_1);
+    ((void)___constructor__F_P13s__anonymous913s__anonymous9_autogen___1((&___ret__13s__anonymous9_1), ___src__13s__anonymous9_1));
+    return ((struct __anonymous9 )___ret__13s__anonymous9_1);
 }
 static inline void ___constructor__F_P13s__anonymous9s_autogen___1(struct __anonymous9 *___dst__P13s__anonymous9_1, short __i__s_1){
@@ -278,6 +298,8 @@
 }
 static inline struct __anonymous10 ___operator_assign__F14s__anonymous10_P14s__anonymous1014s__anonymous10_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, struct __anonymous10 ___src__14s__anonymous10_1){
+    struct __anonymous10 ___ret__14s__anonymous10_1;
     ((void)((*___dst__P14s__anonymous10_1).__i__s_1=___src__14s__anonymous10_1.__i__s_1));
-    return ((struct __anonymous10 )___src__14s__anonymous10_1);
+    ((void)___constructor__F_P14s__anonymous1014s__anonymous10_autogen___1((&___ret__14s__anonymous10_1), ___src__14s__anonymous10_1));
+    return ((struct __anonymous10 )___ret__14s__anonymous10_1);
 }
 static inline void ___constructor__F_P14s__anonymous10s_autogen___1(struct __anonymous10 *___dst__P14s__anonymous10_1, short __i__s_1){
@@ -302,6 +324,8 @@
 }
 static inline struct __anonymous11 ___operator_assign__F14s__anonymous11_P14s__anonymous1114s__anonymous11_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, struct __anonymous11 ___src__14s__anonymous11_1){
+    struct __anonymous11 ___ret__14s__anonymous11_1;
     ((void)((*___dst__P14s__anonymous11_1).__i__s_1=___src__14s__anonymous11_1.__i__s_1));
-    return ((struct __anonymous11 )___src__14s__anonymous11_1);
+    ((void)___constructor__F_P14s__anonymous1114s__anonymous11_autogen___1((&___ret__14s__anonymous11_1), ___src__14s__anonymous11_1));
+    return ((struct __anonymous11 )___ret__14s__anonymous11_1);
 }
 static inline void ___constructor__F_P14s__anonymous11s_autogen___1(struct __anonymous11 *___dst__P14s__anonymous11_1, short __i__s_1){
@@ -326,6 +350,8 @@
 }
 static inline struct __anonymous12 ___operator_assign__F14s__anonymous12_P14s__anonymous1214s__anonymous12_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, struct __anonymous12 ___src__14s__anonymous12_1){
+    struct __anonymous12 ___ret__14s__anonymous12_1;
     ((void)((*___dst__P14s__anonymous12_1).__i__s_1=___src__14s__anonymous12_1.__i__s_1));
-    return ((struct __anonymous12 )___src__14s__anonymous12_1);
+    ((void)___constructor__F_P14s__anonymous1214s__anonymous12_autogen___1((&___ret__14s__anonymous12_1), ___src__14s__anonymous12_1));
+    return ((struct __anonymous12 )___ret__14s__anonymous12_1);
 }
 static inline void ___constructor__F_P14s__anonymous12s_autogen___1(struct __anonymous12 *___dst__P14s__anonymous12_1, short __i__s_1){
@@ -350,6 +376,8 @@
 }
 static inline struct __anonymous13 ___operator_assign__F14s__anonymous13_P14s__anonymous1314s__anonymous13_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, struct __anonymous13 ___src__14s__anonymous13_1){
+    struct __anonymous13 ___ret__14s__anonymous13_1;
     ((void)((*___dst__P14s__anonymous13_1).__i__s_1=___src__14s__anonymous13_1.__i__s_1));
-    return ((struct __anonymous13 )___src__14s__anonymous13_1);
+    ((void)___constructor__F_P14s__anonymous1314s__anonymous13_autogen___1((&___ret__14s__anonymous13_1), ___src__14s__anonymous13_1));
+    return ((struct __anonymous13 )___ret__14s__anonymous13_1);
 }
 static inline void ___constructor__F_P14s__anonymous13s_autogen___1(struct __anonymous13 *___dst__P14s__anonymous13_1, short __i__s_1){
@@ -374,6 +402,8 @@
 }
 static inline struct __anonymous14 ___operator_assign__F14s__anonymous14_P14s__anonymous1414s__anonymous14_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, struct __anonymous14 ___src__14s__anonymous14_1){
+    struct __anonymous14 ___ret__14s__anonymous14_1;
     ((void)((*___dst__P14s__anonymous14_1).__i__s_1=___src__14s__anonymous14_1.__i__s_1));
-    return ((struct __anonymous14 )___src__14s__anonymous14_1);
+    ((void)___constructor__F_P14s__anonymous1414s__anonymous14_autogen___1((&___ret__14s__anonymous14_1), ___src__14s__anonymous14_1));
+    return ((struct __anonymous14 )___ret__14s__anonymous14_1);
 }
 static inline void ___constructor__F_P14s__anonymous14s_autogen___1(struct __anonymous14 *___dst__P14s__anonymous14_1, short __i__s_1){
@@ -398,6 +428,8 @@
 }
 static inline struct __anonymous15 ___operator_assign__F14s__anonymous15_P14s__anonymous1514s__anonymous15_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, struct __anonymous15 ___src__14s__anonymous15_1){
+    struct __anonymous15 ___ret__14s__anonymous15_1;
     ((void)((*___dst__P14s__anonymous15_1).__i__s_1=___src__14s__anonymous15_1.__i__s_1));
-    return ((struct __anonymous15 )___src__14s__anonymous15_1);
+    ((void)___constructor__F_P14s__anonymous1514s__anonymous15_autogen___1((&___ret__14s__anonymous15_1), ___src__14s__anonymous15_1));
+    return ((struct __anonymous15 )___ret__14s__anonymous15_1);
 }
 static inline void ___constructor__F_P14s__anonymous15s_autogen___1(struct __anonymous15 *___dst__P14s__anonymous15_1, short __i__s_1){
@@ -438,6 +470,8 @@
 }
 static inline struct __anonymous16 ___operator_assign__F14s__anonymous16_P14s__anonymous1614s__anonymous16_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, struct __anonymous16 ___src__14s__anonymous16_1){
+    struct __anonymous16 ___ret__14s__anonymous16_1;
     ((void)((*___dst__P14s__anonymous16_1).__i__i_1=___src__14s__anonymous16_1.__i__i_1));
-    return ((struct __anonymous16 )___src__14s__anonymous16_1);
+    ((void)___constructor__F_P14s__anonymous1614s__anonymous16_autogen___1((&___ret__14s__anonymous16_1), ___src__14s__anonymous16_1));
+    return ((struct __anonymous16 )___ret__14s__anonymous16_1);
 }
 static inline void ___constructor__F_P14s__anonymous16i_autogen___1(struct __anonymous16 *___dst__P14s__anonymous16_1, int __i__i_1){
@@ -462,6 +496,8 @@
 }
 static inline struct __anonymous17 ___operator_assign__F14s__anonymous17_P14s__anonymous1714s__anonymous17_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, struct __anonymous17 ___src__14s__anonymous17_1){
+    struct __anonymous17 ___ret__14s__anonymous17_1;
     ((void)((*___dst__P14s__anonymous17_1).__i__i_1=___src__14s__anonymous17_1.__i__i_1));
-    return ((struct __anonymous17 )___src__14s__anonymous17_1);
+    ((void)___constructor__F_P14s__anonymous1714s__anonymous17_autogen___1((&___ret__14s__anonymous17_1), ___src__14s__anonymous17_1));
+    return ((struct __anonymous17 )___ret__14s__anonymous17_1);
 }
 static inline void ___constructor__F_P14s__anonymous17i_autogen___1(struct __anonymous17 *___dst__P14s__anonymous17_1, int __i__i_1){
@@ -486,6 +522,8 @@
 }
 static inline struct __anonymous18 ___operator_assign__F14s__anonymous18_P14s__anonymous1814s__anonymous18_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, struct __anonymous18 ___src__14s__anonymous18_1){
+    struct __anonymous18 ___ret__14s__anonymous18_1;
     ((void)((*___dst__P14s__anonymous18_1).__i__i_1=___src__14s__anonymous18_1.__i__i_1));
-    return ((struct __anonymous18 )___src__14s__anonymous18_1);
+    ((void)___constructor__F_P14s__anonymous1814s__anonymous18_autogen___1((&___ret__14s__anonymous18_1), ___src__14s__anonymous18_1));
+    return ((struct __anonymous18 )___ret__14s__anonymous18_1);
 }
 static inline void ___constructor__F_P14s__anonymous18i_autogen___1(struct __anonymous18 *___dst__P14s__anonymous18_1, int __i__i_1){
@@ -510,6 +548,8 @@
 }
 static inline struct __anonymous19 ___operator_assign__F14s__anonymous19_P14s__anonymous1914s__anonymous19_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, struct __anonymous19 ___src__14s__anonymous19_1){
+    struct __anonymous19 ___ret__14s__anonymous19_1;
     ((void)((*___dst__P14s__anonymous19_1).__i__i_1=___src__14s__anonymous19_1.__i__i_1));
-    return ((struct __anonymous19 )___src__14s__anonymous19_1);
+    ((void)___constructor__F_P14s__anonymous1914s__anonymous19_autogen___1((&___ret__14s__anonymous19_1), ___src__14s__anonymous19_1));
+    return ((struct __anonymous19 )___ret__14s__anonymous19_1);
 }
 static inline void ___constructor__F_P14s__anonymous19i_autogen___1(struct __anonymous19 *___dst__P14s__anonymous19_1, int __i__i_1){
@@ -534,6 +574,8 @@
 }
 static inline struct __anonymous20 ___operator_assign__F14s__anonymous20_P14s__anonymous2014s__anonymous20_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, struct __anonymous20 ___src__14s__anonymous20_1){
+    struct __anonymous20 ___ret__14s__anonymous20_1;
     ((void)((*___dst__P14s__anonymous20_1).__i__i_1=___src__14s__anonymous20_1.__i__i_1));
-    return ((struct __anonymous20 )___src__14s__anonymous20_1);
+    ((void)___constructor__F_P14s__anonymous2014s__anonymous20_autogen___1((&___ret__14s__anonymous20_1), ___src__14s__anonymous20_1));
+    return ((struct __anonymous20 )___ret__14s__anonymous20_1);
 }
 static inline void ___constructor__F_P14s__anonymous20i_autogen___1(struct __anonymous20 *___dst__P14s__anonymous20_1, int __i__i_1){
@@ -558,6 +600,8 @@
 }
 static inline struct __anonymous21 ___operator_assign__F14s__anonymous21_P14s__anonymous2114s__anonymous21_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, struct __anonymous21 ___src__14s__anonymous21_1){
+    struct __anonymous21 ___ret__14s__anonymous21_1;
     ((void)((*___dst__P14s__anonymous21_1).__i__i_1=___src__14s__anonymous21_1.__i__i_1));
-    return ((struct __anonymous21 )___src__14s__anonymous21_1);
+    ((void)___constructor__F_P14s__anonymous2114s__anonymous21_autogen___1((&___ret__14s__anonymous21_1), ___src__14s__anonymous21_1));
+    return ((struct __anonymous21 )___ret__14s__anonymous21_1);
 }
 static inline void ___constructor__F_P14s__anonymous21i_autogen___1(struct __anonymous21 *___dst__P14s__anonymous21_1, int __i__i_1){
@@ -582,6 +626,8 @@
 }
 static inline struct __anonymous22 ___operator_assign__F14s__anonymous22_P14s__anonymous2214s__anonymous22_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, struct __anonymous22 ___src__14s__anonymous22_1){
+    struct __anonymous22 ___ret__14s__anonymous22_1;
     ((void)((*___dst__P14s__anonymous22_1).__i__i_1=___src__14s__anonymous22_1.__i__i_1));
-    return ((struct __anonymous22 )___src__14s__anonymous22_1);
+    ((void)___constructor__F_P14s__anonymous2214s__anonymous22_autogen___1((&___ret__14s__anonymous22_1), ___src__14s__anonymous22_1));
+    return ((struct __anonymous22 )___ret__14s__anonymous22_1);
 }
 static inline void ___constructor__F_P14s__anonymous22i_autogen___1(struct __anonymous22 *___dst__P14s__anonymous22_1, int __i__i_1){
@@ -606,6 +652,8 @@
 }
 static inline struct __anonymous23 ___operator_assign__F14s__anonymous23_P14s__anonymous2314s__anonymous23_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, struct __anonymous23 ___src__14s__anonymous23_1){
+    struct __anonymous23 ___ret__14s__anonymous23_1;
     ((void)((*___dst__P14s__anonymous23_1).__i__i_1=___src__14s__anonymous23_1.__i__i_1));
-    return ((struct __anonymous23 )___src__14s__anonymous23_1);
+    ((void)___constructor__F_P14s__anonymous2314s__anonymous23_autogen___1((&___ret__14s__anonymous23_1), ___src__14s__anonymous23_1));
+    return ((struct __anonymous23 )___ret__14s__anonymous23_1);
 }
 static inline void ___constructor__F_P14s__anonymous23i_autogen___1(struct __anonymous23 *___dst__P14s__anonymous23_1, int __i__i_1){
Index: src/tests/.expect/64/extension.txt
===================================================================
--- src/tests/.expect/64/extension.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/64/extension.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -33,8 +33,10 @@
 }
 static inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___1(struct S *___dst__P2sS_1, struct S ___src__2sS_1){
+    struct S ___ret__2sS_1;
     ((void)((*___dst__P2sS_1).__a__i_1=___src__2sS_1.__a__i_1));
     ((void)((*___dst__P2sS_1).__b__i_1=___src__2sS_1.__b__i_1));
     ((void)((*___dst__P2sS_1).__c__i_1=___src__2sS_1.__c__i_1));
-    return ((struct S )___src__2sS_1);
+    ((void)___constructor__F_P2sS2sS_autogen___1((&___ret__2sS_1), ___src__2sS_1));
+    return ((struct S )___ret__2sS_1);
 }
 static inline void ___constructor__F_P2sSi_autogen___1(struct S *___dst__P2sS_1, int __a__i_1){
@@ -66,6 +68,8 @@
 }
 static inline union U ___operator_assign__F2uU_P2uU2uU_autogen___1(union U *___dst__P2uU_1, union U ___src__2uU_1){
+    union U ___ret__2uU_1;
     ((void)__builtin_memcpy(((void *)___dst__P2uU_1), ((const void *)(&___src__2uU_1)), sizeof(union U )));
-    return ((union U )___src__2uU_1);
+    ((void)___constructor__F_P2uU2uU_autogen___1((&___ret__2uU_1), ___src__2uU_1));
+    return ((union U )___ret__2uU_1);
 }
 static inline void ___constructor__F_P2uUi_autogen___1(union U *___dst__P2uU_1, int __src__i_1){
Index: src/tests/.expect/64/gccExtensions.txt
===================================================================
--- src/tests/.expect/64/gccExtensions.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/64/gccExtensions.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -59,8 +59,10 @@
     }
     inline struct S ___operator_assign__F2sS_P2sS2sS_autogen___2(struct S *___dst__P2sS_2, struct S ___src__2sS_2){
+        struct S ___ret__2sS_2;
         ((void)((*___dst__P2sS_2).__a__i_2=___src__2sS_2.__a__i_2));
         ((void)((*___dst__P2sS_2).__b__i_2=___src__2sS_2.__b__i_2));
         ((void)((*___dst__P2sS_2).__c__i_2=___src__2sS_2.__c__i_2));
-        return ((struct S )___src__2sS_2);
+        ((void)___constructor__F_P2sS2sS_autogen___2((&___ret__2sS_2), ___src__2sS_2));
+        return ((struct S )___ret__2sS_2);
     }
     inline void ___constructor__F_P2sSi_autogen___2(struct S *___dst__P2sS_2, int __a__i_2){
@@ -109,6 +111,8 @@
     }
     inline struct s2 ___operator_assign__F3ss2_P3ss23ss2_autogen___2(struct s2 *___dst__P3ss2_2, struct s2 ___src__3ss2_2){
+        struct s2 ___ret__3ss2_2;
         ((void)((*___dst__P3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2));
-        return ((struct s2 )___src__3ss2_2);
+        ((void)___constructor__F_P3ss23ss2_autogen___2((&___ret__3ss2_2), ___src__3ss2_2));
+        return ((struct s2 )___ret__3ss2_2);
     }
     inline void ___constructor__F_P3ss2i_autogen___2(struct s2 *___dst__P3ss2_2, int __i__i_2){
@@ -128,6 +132,8 @@
     }
     inline struct s3 ___operator_assign__F3ss3_P3ss33ss3_autogen___2(struct s3 *___dst__P3ss3_2, struct s3 ___src__3ss3_2){
+        struct s3 ___ret__3ss3_2;
         ((void)((*___dst__P3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2));
-        return ((struct s3 )___src__3ss3_2);
+        ((void)___constructor__F_P3ss33ss3_autogen___2((&___ret__3ss3_2), ___src__3ss3_2));
+        return ((struct s3 )___ret__3ss3_2);
     }
     inline void ___constructor__F_P3ss3i_autogen___2(struct s3 *___dst__P3ss3_2, int __i__i_2){
@@ -149,6 +155,8 @@
     }
     inline struct s4 ___operator_assign__F3ss4_P3ss43ss4_autogen___2(struct s4 *___dst__P3ss4_2, struct s4 ___src__3ss4_2){
+        struct s4 ___ret__3ss4_2;
         ((void)((*___dst__P3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2));
-        return ((struct s4 )___src__3ss4_2);
+        ((void)___constructor__F_P3ss43ss4_autogen___2((&___ret__3ss4_2), ___src__3ss4_2));
+        return ((struct s4 )___ret__3ss4_2);
     }
     inline void ___constructor__F_P3ss4i_autogen___2(struct s4 *___dst__P3ss4_2, int __i__i_2){
Index: src/tests/.expect/concurrent/sched-int-wait.txt
===================================================================
--- src/tests/.expect/concurrent/sched-int-wait.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/concurrent/sched-int-wait.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -0,0 +1,2 @@
+Starting
+Done
Index: src/tests/.expect/genericUnion.txt
===================================================================
--- src/tests/.expect/genericUnion.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
+++ src/tests/.expect/genericUnion.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -0,0 +1,2 @@
+00000000 ffffffff
+00000000 ffffffff
Index: src/tests/.expect/gmp.txt
===================================================================
--- src/tests/.expect/gmp.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
+++ src/tests/.expect/gmp.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -0,0 +1,272 @@
+constructors
+50000000000000000000 3 50000000000000000003
+x:50000000000000000000 y:3 z:50000000000000000003
+conversions
+y:97
+y:3
+y:-3
+y:4
+y:3
+y:3 b:3 si:3
+comparison
+1
+0
+0
+1
+0
+1
+arithmetic
+z:100000000000000000006
+z:50000000000000000000
+z:-3
+z:-450000000000000000000
+z:150000000000000000000
+z:150000000000000000000
+z:16666666666666666666
+x:16666666666666666666 y:2
+
+Fibonacci Numbers
+0 0
+1 1
+2 1
+3 2
+4 3
+5 5
+6 8
+7 13
+8 21
+9 34
+10 55
+11 89
+12 144
+13 233
+14 377
+15 610
+16 987
+17 1597
+18 2584
+19 4181
+20 6765
+21 10946
+22 17711
+23 28657
+24 46368
+25 75025
+26 121393
+27 196418
+28 317811
+29 514229
+30 832040
+31 1346269
+32 2178309
+33 3524578
+34 5702887
+35 9227465
+36 14930352
+37 24157817
+38 39088169
+39 63245986
+40 102334155
+41 165580141
+42 267914296
+43 433494437
+44 701408733
+45 1134903170
+46 1836311903
+47 2971215073
+48 4807526976
+49 7778742049
+50 12586269025
+51 20365011074
+52 32951280099
+53 53316291173
+54 86267571272
+55 139583862445
+56 225851433717
+57 365435296162
+58 591286729879
+59 956722026041
+60 1548008755920
+61 2504730781961
+62 4052739537881
+63 6557470319842
+64 10610209857723
+65 17167680177565
+66 27777890035288
+67 44945570212853
+68 72723460248141
+69 117669030460994
+70 190392490709135
+71 308061521170129
+72 498454011879264
+73 806515533049393
+74 1304969544928657
+75 2111485077978050
+76 3416454622906707
+77 5527939700884757
+78 8944394323791464
+79 14472334024676221
+80 23416728348467685
+81 37889062373143906
+82 61305790721611591
+83 99194853094755497
+84 160500643816367088
+85 259695496911122585
+86 420196140727489673
+87 679891637638612258
+88 1100087778366101931
+89 1779979416004714189
+90 2880067194370816120
+91 4660046610375530309
+92 7540113804746346429
+93 12200160415121876738
+94 19740274219868223167
+95 31940434634990099905
+96 51680708854858323072
+97 83621143489848422977
+98 135301852344706746049
+99 218922995834555169026
+100 354224848179261915075
+101 573147844013817084101
+102 927372692193078999176
+103 1500520536206896083277
+104 2427893228399975082453
+105 3928413764606871165730
+106 6356306993006846248183
+107 10284720757613717413913
+108 16641027750620563662096
+109 26925748508234281076009
+110 43566776258854844738105
+111 70492524767089125814114
+112 114059301025943970552219
+113 184551825793033096366333
+114 298611126818977066918552
+115 483162952612010163284885
+116 781774079430987230203437
+117 1264937032042997393488322
+118 2046711111473984623691759
+119 3311648143516982017180081
+120 5358359254990966640871840
+121 8670007398507948658051921
+122 14028366653498915298923761
+123 22698374052006863956975682
+124 36726740705505779255899443
+125 59425114757512643212875125
+126 96151855463018422468774568
+127 155576970220531065681649693
+128 251728825683549488150424261
+129 407305795904080553832073954
+130 659034621587630041982498215
+131 1066340417491710595814572169
+132 1725375039079340637797070384
+133 2791715456571051233611642553
+134 4517090495650391871408712937
+135 7308805952221443105020355490
+136 11825896447871834976429068427
+137 19134702400093278081449423917
+138 30960598847965113057878492344
+139 50095301248058391139327916261
+140 81055900096023504197206408605
+141 131151201344081895336534324866
+142 212207101440105399533740733471
+143 343358302784187294870275058337
+144 555565404224292694404015791808
+145 898923707008479989274290850145
+146 1454489111232772683678306641953
+147 2353412818241252672952597492098
+148 3807901929474025356630904134051
+149 6161314747715278029583501626149
+150 9969216677189303386214405760200
+151 16130531424904581415797907386349
+152 26099748102093884802012313146549
+153 42230279526998466217810220532898
+154 68330027629092351019822533679447
+155 110560307156090817237632754212345
+156 178890334785183168257455287891792
+157 289450641941273985495088042104137
+158 468340976726457153752543329995929
+159 757791618667731139247631372100066
+160 1226132595394188293000174702095995
+161 1983924214061919432247806074196061
+162 3210056809456107725247980776292056
+163 5193981023518027157495786850488117
+164 8404037832974134882743767626780173
+165 13598018856492162040239554477268290
+166 22002056689466296922983322104048463
+167 35600075545958458963222876581316753
+168 57602132235424755886206198685365216
+169 93202207781383214849429075266681969
+170 150804340016807970735635273952047185
+171 244006547798191185585064349218729154
+172 394810887814999156320699623170776339
+173 638817435613190341905763972389505493
+174 1033628323428189498226463595560281832
+175 1672445759041379840132227567949787325
+176 2706074082469569338358691163510069157
+177 4378519841510949178490918731459856482
+178 7084593923980518516849609894969925639
+179 11463113765491467695340528626429782121
+180 18547707689471986212190138521399707760
+181 30010821454963453907530667147829489881
+182 48558529144435440119720805669229197641
+183 78569350599398894027251472817058687522
+184 127127879743834334146972278486287885163
+185 205697230343233228174223751303346572685
+186 332825110087067562321196029789634457848
+187 538522340430300790495419781092981030533
+188 871347450517368352816615810882615488381
+189 1409869790947669143312035591975596518914
+190 2281217241465037496128651402858212007295
+191 3691087032412706639440686994833808526209
+192 5972304273877744135569338397692020533504
+193 9663391306290450775010025392525829059713
+194 15635695580168194910579363790217849593217
+195 25299086886458645685589389182743678652930
+196 40934782466626840596168752972961528246147
+197 66233869353085486281758142155705206899077
+198 107168651819712326877926895128666735145224
+199 173402521172797813159685037284371942044301
+200 280571172992510140037611932413038677189525
+
+Factorial Numbers
+0 1
+1 1
+2 2
+3 6
+4 24
+5 120
+6 720
+7 5040
+8 40320
+9 362880
+10 3628800
+11 39916800
+12 479001600
+13 6227020800
+14 87178291200
+15 1307674368000
+16 20922789888000
+17 355687428096000
+18 6402373705728000
+19 121645100408832000
+20 2432902008176640000
+21 51090942171709440000
+22 1124000727777607680000
+23 25852016738884976640000
+24 620448401733239439360000
+25 15511210043330985984000000
+26 403291461126605635584000000
+27 10888869450418352160768000000
+28 304888344611713860501504000000
+29 8841761993739701954543616000000
+30 265252859812191058636308480000000
+31 8222838654177922817725562880000000
+32 263130836933693530167218012160000000
+33 8683317618811886495518194401280000000
+34 295232799039604140847618609643520000000
+35 10333147966386144929666651337523200000000
+36 371993326789901217467999448150835200000000
+37 13763753091226345046315979581580902400000000
+38 523022617466601111760007224100074291200000000
+39 20397882081197443358640281739902897356800000000
+40 815915283247897734345611269596115894272000000000
Index: src/tests/.expect/memberCtors-ERR1.txt
===================================================================
--- src/tests/.expect/memberCtors-ERR1.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/memberCtors-ERR1.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -1,1 +1,1 @@
-memberCtors.c:62 error: in void ?{}(B *b), field a2 used before being constructed
+memberCtors.c:71 error: in void ?{}(B *b), field a2 used before being constructed
Index: src/tests/.expect/memberCtors.txt
===================================================================
--- src/tests/.expect/memberCtors.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/memberCtors.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -16,4 +16,41 @@
 assigning int: 0 0
 end construct A
+copy constructing int: 0
+copy constructing int: 0
+begin copy construct A
+copy construct this->x
+copy constructing int: 1001
+assign this->y
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+end copy construct A
+begin ?=? A
+copy constructing int: 1001
+destructing int: 1001
+destructing int: 1001
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+end ?=? A
+copy constructing int: 0
+copy constructing int: 0
+begin copy construct A
+copy construct this->x
+copy constructing int: 1001
+assign this->y
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+end copy construct A
+destructing int: 0
+destructing int: 0
+destructing int: 1001
+destructing int: 0
+destructing int: 0
+destructing int: 1001
 construct b->a1
 constructing int
@@ -36,18 +73,27 @@
 copy constructing int: 1000
 assign this->y
-end copy construct A
-copy constructing int: 0
-copy constructing int: 0
-begin copy construct A
-copy construct this->x
-copy constructing int: 1001
-assign this->y
-end copy construct A
-copy constructing int: 0
-copy constructing int: 0
-begin copy construct A
-copy construct this->x
-copy constructing int: 0
-assign this->y
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+end copy construct A
+copy constructing int: 0
+copy constructing int: 0
+begin copy construct A
+copy construct this->x
+copy constructing int: 1001
+assign this->y
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+end copy construct A
+copy constructing int: 0
+copy constructing int: 0
+begin copy construct A
+copy construct this->x
+copy constructing int: 0
+assign this->y
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
 end copy construct A
 End of main
@@ -60,4 +106,41 @@
 assigning int: 0 0
 end construct A
+copy constructing int: 0
+copy constructing int: 0
+begin copy construct A
+copy construct this->x
+copy constructing int: 999
+assign this->y
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+end copy construct A
+begin ?=? A
+copy constructing int: 999
+destructing int: 999
+destructing int: 999
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+end ?=? A
+copy constructing int: 0
+copy constructing int: 0
+begin copy construct A
+copy construct this->x
+copy constructing int: 999
+assign this->y
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+end copy construct A
+destructing int: 0
+destructing int: 0
+destructing int: 999
+destructing int: 0
+destructing int: 0
+destructing int: 999
 destructing int: 0
 destructing int: 0
@@ -80,4 +163,41 @@
 assigning int: 0 0
 end construct A
+copy constructing int: 0
+copy constructing int: 0
+begin copy construct A
+copy construct this->x
+copy constructing int: 999
+assign this->y
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+end copy construct A
+begin ?=? A
+copy constructing int: 999
+destructing int: 999
+destructing int: 999
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+end ?=? A
+copy constructing int: 0
+copy constructing int: 0
+begin copy construct A
+copy construct this->x
+copy constructing int: 999
+assign this->y
+copy constructing int: 0
+destructing int: 0
+destructing int: 0
+end copy construct A
+destructing int: 0
+destructing int: 0
+destructing int: 999
+destructing int: 0
+destructing int: 0
+destructing int: 999
 destructing int: 0
 destructing int: 0
Index: src/tests/.expect/rational.txt
===================================================================
--- src/tests/.expect/rational.txt	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/.expect/rational.txt	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -17,11 +17,4 @@
 3/1
 4/3
-conversion
-0.75
-0.142857142857143
-3.14159292035398
-3/4
-1/7
-355/113
 decompose
 more tests
Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/Makefile.am	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -11,11 +11,11 @@
 ## Created On       : Sun May 31 09:08:15 2015
 ## Last Modified By : Peter A. Buhr
-## Last Modified On : Thu Feb 16 15:27:50 2017
-## Update Count     : 41
+## Last Modified On : Sun May 14 14:43:48 2017
+## Update Count     : 42
 ###############################################################################
 
 debug=yes
 
-quick_test=vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once
+quick_test=vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once attributes
 
 if BUILD_CONCURRENCY
@@ -30,5 +30,5 @@
 # applies to both programs
 EXTRA_FLAGS =
-BUILD_FLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS}
+BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ ${EXTRA_FLAGS}
 TEST_FLAGS = $(if $(test), 2> .err/${@}.log, )
 CFLAGS = ${TEST_FLAGS} ${BUILD_FLAGS}
@@ -76,17 +76,20 @@
 
 declarationSpecifier: declarationSpecifier.c
-	${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
+	${CC} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
 
 gccExtensions : gccExtensions.c
-	${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
+	${CC} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
 
 extension : extension.c
-	${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
+	${CC} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
 
 attributes : attributes.c
-	${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
+	${CC} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
 
 KRfunctions : KRfunctions.c
-	${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
+	${CC} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
+
+gmp : gmp.c
+	${CC} ${CFLAGS} -lgmp ${<} -o ${@}
 
 memberCtors-ERR1: memberCtors.c
Index: src/tests/Makefile.in
===================================================================
--- src/tests/Makefile.in	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/Makefile.in	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -226,5 +226,5 @@
 quick_test = vector_test avl_test operators numericConstants \
 	expression enum array typeof cast dtor-early-exit init_once \
-	$(am__append_1)
+	attributes $(am__append_1)
 @BUILD_CONCURRENCY_FALSE@concurrent = no
 @BUILD_CONCURRENCY_TRUE@concurrent = yes
@@ -234,5 +234,5 @@
 # applies to both programs
 EXTRA_FLAGS = 
-BUILD_FLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS}
+BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ ${EXTRA_FLAGS}
 TEST_FLAGS = $(if $(test), 2> .err/${@}.log, )
 fstream_test_SOURCES = fstream_test.c
@@ -695,17 +695,20 @@
 
 declarationSpecifier: declarationSpecifier.c
-	${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
+	${CC} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
 
 gccExtensions : gccExtensions.c
-	${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
+	${CC} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
 
 extension : extension.c
-	${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
+	${CC} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
 
 attributes : attributes.c
-	${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
+	${CC} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
 
 KRfunctions : KRfunctions.c
-	${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
+	${CC} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
+
+gmp : gmp.c
+	${CC} ${CFLAGS} -lgmp ${<} -o ${@}
 
 memberCtors-ERR1: memberCtors.c
Index: src/tests/genericUnion.c
===================================================================
--- src/tests/genericUnion.c	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
+++ src/tests/genericUnion.c	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -0,0 +1,30 @@
+#include <limits>
+
+forall(otype T)
+union ByteView {
+	T val;
+	char bytes[(sizeof(int))]; // want to change to sizeof(T)
+};
+
+forall(otype T)
+void print(ByteView(T) x) {
+	for (int i = 0; i < sizeof(int); i++) { // want to change to sizeof(T)
+		printf("%02x", x.bytes[i] & 0xff);
+	}
+}
+
+forall(otype T)
+void f(ByteView(T) x, T val) {
+	print(x);
+	printf(" ");
+	x.val = val;
+	print(x);
+	printf("\n");
+}
+
+int main() {
+	ByteView(unsigned) u = { 0 };
+	ByteView(int) i = { 0 };
+	f(u, MAX);
+	f(i, -1);
+}
Index: src/tests/gmp.c
===================================================================
--- src/tests/gmp.c	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
+++ src/tests/gmp.c	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -0,0 +1,96 @@
+// 
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+// 
+// gmp.c -- 
+// 
+// Author           : Peter A. Buhr
+// Created On       : Tue Apr 19 08:55:51 2016
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Sun May 14 14:46:50 2017
+// Update Count     : 530
+// 
+
+#include <gmp>
+
+int main() {
+	sout | "constructors" | endl;
+	short int si = 3;
+	Int x = { "50000000000000000000" }, y = { si }, z = x + y;
+	sout | x | y | z | endl;
+	sout | "x:" | x | "y:" | y | "z:" | z | endl;
+
+	sout | "conversions" | endl;
+	y = 'a';
+	sout | "y:" | y | endl;
+	y = si;
+	sout | "y:" | y | endl;
+	y = -3;
+	sout | "y:" | y | endl;
+	y += 7;
+	sout | "y:" | y | endl;
+	y -= 1;
+	sout | "y:" | y | endl;
+	int b;
+	b = y;
+	si = y;
+	sout | "y:" | y | "b:" | b | "si:" | si | endl;
+
+	sout | "comparison" | endl;
+	sout | x == x | endl;
+	sout | x != x | endl;
+	sout | x < x | endl;
+	sout | x <= x | endl;
+	sout | x > x | endl;
+	sout | x >= x | endl;
+
+	sout | "arithmetic" | endl;
+	z = x + y + z;
+	sout | "z:" | z | endl;
+	z = z = x;
+	sout | "z:" | z | endl;
+	z = x - y - z;
+	sout | "z:" | z | endl;
+	z = x * y * z;
+	sout | "z:" | z | endl;
+	z = x * 3;
+	sout | "z:" | z | endl;
+	z = 3 * x;
+	sout | "z:" | z | endl;
+	z = x / 3;
+	sout | "z:" | z | endl;
+	[ x, y ] = div( x, 3 );
+	sout | "x:" | x | "y:" | y | endl;
+//	sout | div( x, 3 ) | x / 3 | "," | x % 3 | endl;
+
+	sout | endl;
+
+	sout | "Fibonacci Numbers" | endl;
+	Int fn, fn1, fn2;
+	fn = (Int){0}; fn1 = fn;							// 1st case
+	sout | (int)0 | fn | endl;
+	fn = (Int){1}; fn2 = fn1; fn1 = fn;					// 2nd case
+	sout | 1 | fn | endl;
+	for ( int i = 2; i <= 200; i += 1 ) {
+		fn = fn1 + fn2; fn2 = fn1; fn1 = fn;			// general case
+		sout | i | fn | endl;
+	} // for
+
+	sout | endl;
+
+	sout | "Factorial Numbers" | endl;
+	Int fact;
+	fact = (Int){1};									// 1st case
+	sout | (int)0 | fact | endl;
+	for ( int i = 1; i <= 40; i += 1 ) {
+		fact = fact * i;								// general case
+		sout | i | fact | endl;
+	} // for
+} // main
+
+// Local Variables: //
+// mode: c //
+// tab-width: 4 //
+// End: //
Index: src/tests/memberCtors.c
===================================================================
--- src/tests/memberCtors.c	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/memberCtors.c	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -53,4 +53,13 @@
 } // z never constructed - will be automatically copy constructed
 
+A ?=?(A * this, A other) {
+  printf("begin ?=? A\n");
+  this->x = other.x;
+  this->y = other.y;
+  this->z = other.z;
+  printf("end ?=? A\n");
+  return *this;
+}
+
 struct B {
   A a1, a2, a3;
Index: src/tests/rational.c
===================================================================
--- src/tests/rational.c	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/rational.c	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -10,29 +10,36 @@
 // Created On       : Mon Mar 28 08:43:12 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue May  2 22:11:05 2017
-// Update Count     : 41
+// Last Modified On : Sun May 14 18:10:28 2017
+// Update Count     : 57
 // 
 
+#include <rational>
 #include <limits>
-#include <rational>
+#include <stdlib>
 #include <fstream>
+
+// UNNECESSARY, FIX ME
+void ?{}( int * this ) { *this = 0; }
+void ?{}( int * this, zero_t ) { *this = 0; }
+void ?{}( int * this, one_t ) { *this = 1; }
 
 int main() {
 	sout | "constructor" | endl;
-	Rational a = { 3 }, b = { 4 }, c;
+	Rational(int) a = { 3 }, b = { 4 }, c;
 	sout | a | b | c | endl;
-	a = (Rational){ 4, 8 };
-	b = (Rational){ 5, 7 };
+
+	a = (Rational(int)){ 4, 8 };
+	b = (Rational(int)){ 5, 7 };
 	sout | a | b | endl;
-	a = (Rational){ -2, -3 };
-	b = (Rational){ 3, -2 };
+	a = (Rational(int)){ -2, -3 };
+	b = (Rational(int)){ 3, -2 };
 	sout | a | b | endl;
-	a = (Rational){ -2, 3 };
-	b = (Rational){ 3, 2 };
+	a = (Rational(int)){ -2, 3 };
+	b = (Rational(int)){ 3, 2 };
 	sout | a | b | endl;
 
 	sout | "logical" | endl;
-	a = (Rational){ -2 };
-	b = (Rational){ -3, 2 };
+	a = (Rational(int)){ -2 };
+	b = (Rational(int)){ -3, 2 };
 	sout | a | b | endl;
 //	sout | a == 1 | endl; // FIX ME
@@ -50,22 +57,22 @@
 	sout | a / b | endl;
 
-	sout | "conversion" | endl;
-	a = (Rational){ 3, 4 };
-	sout | widen( a ) | endl;
-	a = (Rational){ 1, 7 };
-	sout | widen( a ) | endl;
-	a = (Rational){ 355, 113 };
-	sout | widen( a ) | endl;
-	sout | narrow( 0.75, 4 ) | endl;
-	sout | narrow( 0.14285714285714, 16 ) | endl;
-	sout | narrow( 3.14159265358979, 256 ) | endl;
+//	sout | "conversion" | endl;
+//	a = (Rational(int)){ 3, 4 };
+//	sout | widen( a ) | endl;
+//	a = (Rational(int)){ 1, 7 };
+//	sout | widen( a ) | endl;
+//	a = (Rational(int)){ 355, 113 };
+//	sout | widen( a ) | endl;
+//	sout | narrow( 0.75, 4 ) | endl;
+//	sout | narrow( 0.14285714285714, 16 ) | endl;
+//	sout | narrow( 3.14159265358979, 256 ) | endl;
 
 	sout | "decompose" | endl;
-	RationalImpl n, d;
+	int n, d;
 //	[n, d] = a;
 //	sout | a | n | d | endl;
 
 	sout | "more tests" | endl;
-	Rational x = { 1, 2 }, y = { 2 };
+	Rational(int) x = { 1, 2 }, y = { 2 };
 	sout | x - y | endl;
 	sout | x > y | endl;
@@ -73,12 +80,12 @@
 	sout | y | denominator( y, -2 ) | y | endl;
 
-	Rational z = { 0, 5 };
+	Rational(int) z = { 0, 5 };
 	sout | z | endl;
 
 	sout | x | numerator( x, 0 ) | x | endl;
 
-	x = (Rational){ 1, MAX } + (Rational){ 1, MAX };
+	x = (Rational(int)){ 1, MAX } + (Rational(int)){ 1, MAX };
 	sout | x | endl;
-	x = (Rational){ 3, MAX } + (Rational){ 2, MAX };
+	x = (Rational(int)){ 3, MAX } + (Rational(int)){ 2, MAX };
 	sout | x | endl;
 
Index: src/tests/sched-int-wait.c
===================================================================
--- src/tests/sched-int-wait.c	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/sched-int-wait.c	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -113,4 +113,5 @@
 	waiter_left = 4;
 	processor p;
+	sout | "Starting" | endl;
 	{
 		Signaler  e;
@@ -122,3 +123,4 @@
 		}
 	}
+	sout | "Done" | endl;
 }
Index: src/tests/test.py
===================================================================
--- src/tests/test.py	(revision dbfb35d76ceed772a6ff46bbdccff6cee91c436e)
+++ src/tests/test.py	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -24,9 +24,14 @@
         self.name, self.path = name, path
 
+class TestResult:
+	SUCCESS = 0
+	FAILURE = 1
+	TIMEOUT = 124
+
 # parses the Makefile to find the machine type (32-bit / 64-bit)
 def getMachineType():
 	sh('echo "void ?{}(int*a,int b){}int main(){return 0;}" > .dummy.c')
 	ret, out = sh("make .dummy -s", print2stdout=True)
-	
+
 	if ret != 0:
 		print("Failed to identify architecture:")
@@ -161,5 +166,8 @@
 
 	# build, skipping to next test on error
-	make_ret, _ = sh("""%s test=yes EXTRA_FLAGS="-quiet %s" %s 2> %s 1> /dev/null""" % (make_cmd, options, test.name, out_file), dry_run)
+	make_ret, _ = sh("""%s test=yes EXTRA_FLAGS="%s" %s 2> %s 1> /dev/null""" % (make_cmd, options, test.name, out_file), dry_run)
+
+	retcode = 0
+	error = None
 
 	# if the make command succeds continue otherwise skip to diff
@@ -170,5 +178,5 @@
 		if fileIsExecutable(test.name) :
 			# run test
-			sh("./%s %s > %s 2>&1" % (test.name, stdinput, out_file), dry_run)
+			retcode, _ = sh("timeout 60 ./%s %s > %s 2>&1" % (test.name, stdinput, out_file), dry_run)
 		else :
 			# simply cat the result into the output
@@ -179,18 +187,14 @@
 		sh("mv %s %s" % (err_file, out_file), dry_run)
 
-	retcode = 0
-	error = None
-
-	if generate :
-		# if we are ounly generating the output we still need to check that the test actually exists
-		if not dry_run and fileContainsOnly(out_file, "make: *** No rule to make target `%s'.  Stop." % test.name) :
-			retcode = 1;
-			error = "\t\tNo make target for test %s!" % test.name
-			sh("rm %s" % out_file, False)
-
-	else :
-		# fetch return code and error from the diff command
-		retcode, error = diff(".expect/%s.txt" % test.path, ".out/%s.log" % test.name, dry_run)
-	
+	if retcode == 0:
+		if generate :
+			# if we are ounly generating the output we still need to check that the test actually exists
+			if not dry_run and fileContainsOnly(out_file, "make: *** No rule to make target `%s'.  Stop." % test.name) :
+				retcode = 1;
+				error = "\t\tNo make target for test %s!" % test.name
+				sh("rm %s" % out_file, False)
+		else :
+			# fetch return code and error from the diff command
+			retcode, error = diff(".expect/%s.txt" % test.path, ".out/%s.log" % test.name, dry_run)
 	# clean the executable
 	sh("rm -f %s > /dev/null 2>&1" % test.name, dry_run)
@@ -205,17 +209,18 @@
 	name_txt = "%20s  " % t.name
 
-	#run the test instance and collect the result
-	test_failed, error = run_single_test(t, generate, dry_run, debug)
+	retcode, error = run_single_test(t, generate, dry_run, debug)
 
 	# update output based on current action
 	if generate :
-		failed_txt = "ERROR"
-		success_txt = "Done"
-	else :
-		failed_txt = "FAILED"
-		success_txt = "PASSED"
+		if   retcode == TestResult.SUCCESS: 	result_txt = "Done"
+		elif retcode == TestResult.TIMEOUT: 	result_txt = "TIMEOUT"
+		else :						result_txt = "ERROR"
+	else :
+		if   retcode == TestResult.SUCCESS: 	result_txt = "PASSED"
+		elif retcode == TestResult.TIMEOUT: 	result_txt = "TIMEOUT"
+		else :						result_txt = "FAILED"
 
 	#print result with error if needed
-	text = name_txt + (failed_txt if test_failed else success_txt)
+	text = name_txt + result_txt
 	out = sys.stdout
 	if error :
@@ -223,10 +228,10 @@
 		out = sys.stderr
 
-	print(text, file = out);
+	print(text, file = out)
 	sys.stdout.flush()
 	sys.stderr.flush()
 	signal.signal(signal.SIGINT, signal.SIG_IGN)
 
-	return test_failed
+	return retcode != TestResult.SUCCESS
 
 # run the given list of tests with the given parameters
@@ -269,6 +274,6 @@
 if __name__ == "__main__":
 	#always run from same folder
-	chdir() 
-	
+	chdir()
+
 	# parse the command line arguments
 	options = getOptions()
Index: tools/cfa.nanorc
===================================================================
--- tools/cfa.nanorc	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
+++ tools/cfa.nanorc	(revision 3bd1eb471d053efbb45a2ac703577e3d15f3a382)
@@ -0,0 +1,57 @@
+## Cforall syntax colouring.
+## WIP
+
+syntax "cfa" "\.cfa$"
+## No magic
+
+# Macros
+color brightred "\<[A-Z_][0-9A-Z_]+\>"
+
+# Types
+color green "\<(forall|otype|dtype|ftype|trait|mutex|_Bool|volatile)\>"
+color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|auto)\>"
+color green "\<(static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
+color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
+
+# Declarations
+color brightgreen "\<(struct|union|typedef|trait|coroutine|monitor)\>"
+
+# Control Flow Structures
+color brightyellow "\<(if|else|while|do|for|switch|choose|case|default)\>"
+##color brightyellow "\<(try|catch|catchResume|finally)\>"
+
+# Control Flow Statements
+color magenta "\<(return|break|continue|fallthru|throw)\>"
+
+# Operator Names
+color blue "\^?\?\{\}|\?\[\?\]|\?\(\)" "\?(\+\+|--)" "(\+\+?|--?|\*|~|!)\?"
+color blue "\?(=|\+|-|\*|/|%|\&|\||\^|<<?|>>?)=?\?" "\?!=\?"
+
+## The <...> in attributes can be coloured as strings. (??)
+## color red "\<<?[[:alpha:]][[:alnum:]_]*>?![[:lower:]]+\>"
+
+## Update/Redistribute
+# GCC builtins
+##color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
+
+# Preprocesser Directives
+color brightcyan "^[[:space:]]*#[[:space:]]*(include(_next)?|define|(ifn?|un)def|if|el(if|se)|endif|error|warning|pragma)"
+
+# Values
+# Characters
+color brightmagenta "'([^'\]|(\\")|(\\['abfnrtv\\]))'"
+color brightmagenta "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
+# Strings and Angle Strings
+color brightyellow ""([^"]|\\")*"" "<[^[:blank:]=]*>"
+# Multiline Strings: This regex is VERY expencive and often too strong.
+###color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
+
+# Comments
+color brightblue "//.*"
+color brightblue start="/\*" end="\*/"
+
+# Reminders
+color ,yellow "\<(FIXME|TODO|XXX)\>"
+
+# Trailing Whitespace
+color ,green "[[:space:]]+$"
