Index: driver/cc1.cc
===================================================================
--- driver/cc1.cc	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ driver/cc1.cc	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -335,4 +335,12 @@
 	#endif // __DEBUG_H__
 
+	enum {
+		Color_Auto   = 0,
+		Color_Always = 1,
+		Color_Never  = 2,
+	} color_arg = Color_Auto;
+
+	const char * color_names[3] = { "--colors=auto", "--colors=always", "--colors=never" };
+
 	// process all the arguments
 
@@ -341,4 +349,13 @@
 		if ( prefix( arg, "-" ) ) {
 			// strip inappropriate flags
+
+			if ( prefix( arg, "-fdiagnostics-color=" ) ) {
+				string choice = arg.substr(20);
+				     if(choice == "always") color_arg = Color_Always;
+				else if(choice == "never" ) color_arg = Color_Never;
+				else if(choice == "auto"  ) color_arg = Color_Auto;
+			} else if ( arg == "-fno-diagnostics-color" ) {
+				color_arg = Color_Auto;
+			}
 
 			if ( arg == "-quiet" || arg == "-version" || arg == "-fpreprocessed" ||
@@ -440,4 +457,7 @@
 			cargs[ncargs++] = cfa_cpp_out.c_str();
 		} // if
+
+		cargs[ncargs++] = color_names[color_arg];
+
 		cargs[ncargs] = nullptr;						// terminate argument list
 
Index: libcfa/src/bits/defs.hfa
===================================================================
--- libcfa/src/bits/defs.hfa	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ libcfa/src/bits/defs.hfa	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -47,2 +47,8 @@
 #define OPTIONAL_THREAD __attribute__((weak))
 #endif
+
+static inline long long rdtscl(void) {
+    unsigned int lo, hi;
+    __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
+    return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 );
+}
Index: libcfa/src/concurrency/invoke.h
===================================================================
--- libcfa/src/concurrency/invoke.h	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ libcfa/src/concurrency/invoke.h	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -46,5 +46,5 @@
 	#ifdef __cforall
 	extern "Cforall" {
-		extern thread_local struct KernelThreadData {
+		extern __attribute__((aligned(128))) thread_local struct KernelThreadData {
 			struct thread_desc    * volatile this_thread;
 			struct processor      * volatile this_processor;
@@ -55,4 +55,6 @@
 				volatile bool in_progress;
 			} preemption_state;
+
+			uint32_t rand_seed;
 		} kernelTLS __attribute__ ((tls_model ( "initial-exec" )));
 	}
Index: libcfa/src/concurrency/kernel.cfa
===================================================================
--- libcfa/src/concurrency/kernel.cfa	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ libcfa/src/concurrency/kernel.cfa	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -133,5 +133,6 @@
 	NULL,
 	NULL,
-	{ 1, false, false }
+	{ 1, false, false },
+	6u //this should be seeded better but due to a bug calling rdtsc doesn't work
 };
 
@@ -260,4 +261,8 @@
 //Main of the processor contexts
 void main(processorCtx_t & runner) {
+	// Because of a bug, we couldn't initialized the seed on construction
+	// Do it here
+	kernelTLS.rand_seed ^= rdtscl();
+
 	processor * this = runner.proc;
 	verify(this);
Index: libcfa/src/concurrency/kernel_private.hfa
===================================================================
--- libcfa/src/concurrency/kernel_private.hfa	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ libcfa/src/concurrency/kernel_private.hfa	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -101,4 +101,11 @@
 #define KERNEL_STORAGE(T,X) static char storage_##X[sizeof(T)]
 
+static inline uint32_t tls_rand() {
+	kernelTLS.rand_seed ^= kernelTLS.rand_seed << 6;
+	kernelTLS.rand_seed ^= kernelTLS.rand_seed >> 21;
+	kernelTLS.rand_seed ^= kernelTLS.rand_seed << 7;
+	return kernelTLS.rand_seed;
+}
+
 
 void doregister( struct cluster & cltr );
Index: src/AST/Convert.cpp
===================================================================
--- src/AST/Convert.cpp	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/AST/Convert.cpp	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -887,5 +887,5 @@
 		auto expr = visitBaseExpr( node,
 			new AsmExpr(
-				get<Expression>().accept1(node->inout),
+				new std::string(node->inout),
 				get<Expression>().accept1(node->constraint),
 				get<Expression>().accept1(node->operand)
@@ -2258,5 +2258,5 @@
 			new ast::AsmExpr(
 				old->location,
-				GET_ACCEPT_1(inout, Expr),
+				old->inout,
 				GET_ACCEPT_1(constraint, Expr),
 				GET_ACCEPT_1(operand, Expr)
Index: src/AST/Expr.hpp
===================================================================
--- src/AST/Expr.hpp	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/AST/Expr.hpp	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -556,9 +556,9 @@
 class AsmExpr final : public Expr {
 public:
-	ptr<Expr> inout;
+	std::string inout;
 	ptr<Expr> constraint;
 	ptr<Expr> operand;
 
-	AsmExpr( const CodeLocation & loc, const Expr * io, const Expr * con, const Expr * op )
+	AsmExpr( const CodeLocation & loc, const std::string & io, const Expr * con, const Expr * op )
 	: Expr( loc ), inout( io ), constraint( con ), operand( op ) {}
 
Index: src/AST/Pass.impl.hpp
===================================================================
--- src/AST/Pass.impl.hpp	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/AST/Pass.impl.hpp	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -1300,5 +1300,4 @@
 			maybe_accept( node, &AsmExpr::result );
 		}
-		maybe_accept( node, &AsmExpr::inout      );
 		maybe_accept( node, &AsmExpr::constraint );
 		maybe_accept( node, &AsmExpr::operand    );
Index: src/AST/Print.cpp
===================================================================
--- src/AST/Print.cpp	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/AST/Print.cpp	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -1011,5 +1011,5 @@
 		os << "Asm Expression:" << endl;
 		++indent;
-		if ( node->inout ) node->inout->accept( *this );
+		if ( !node->inout.empty() ) os << "[" << node->inout << "] ";
 		if ( node->constraint ) node->constraint->accept( *this );
 		if ( node->operand ) node->operand->accept( *this );
Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/CodeGen/CodeGenerator.cc	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -786,12 +786,12 @@
 
 	void CodeGenerator::postvisit( AsmExpr * asmExpr ) {
-		if ( asmExpr->get_inout() ) {
+		if ( !asmExpr->inout.empty() ) {
 			output << "[ ";
-			asmExpr->get_inout()->accept( *visitor );
+			output << asmExpr->inout;
 			output << " ] ";
 		} // if
-		asmExpr->get_constraint()->accept( *visitor );
+		asmExpr->constraint->accept( *visitor );
 		output << " ( ";
-		asmExpr->get_operand()->accept( *visitor );
+		asmExpr->operand->accept( *visitor );
 		output << " )";
 	}
Index: src/Common/PassVisitor.impl.h
===================================================================
--- src/Common/PassVisitor.impl.h	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/Common/PassVisitor.impl.h	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -2452,5 +2452,4 @@
 
 	indexerScopedAccept( node->result    , *this );
-	maybeAccept_impl   ( node->inout     , *this );
 	maybeAccept_impl   ( node->constraint, *this );
 	maybeAccept_impl   ( node->operand   , *this );
@@ -2464,5 +2463,4 @@
 
 	indexerScopedAccept( node->result    , *this );
-	maybeAccept_impl   ( node->inout     , *this );
 	maybeAccept_impl   ( node->constraint, *this );
 	maybeAccept_impl   ( node->operand   , *this );
@@ -2477,5 +2475,4 @@
 	indexerScopedMutate( node->env       , *this );
 	indexerScopedMutate( node->result    , *this );
-	maybeMutate_impl   ( node->inout     , *this );
 	maybeMutate_impl   ( node->constraint, *this );
 	maybeMutate_impl   ( node->operand   , *this );
Index: src/Common/SemanticError.cc
===================================================================
--- src/Common/SemanticError.cc	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/Common/SemanticError.cc	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -149,21 +149,27 @@
 // Helpers
 namespace ErrorHelpers {
+	Colors colors = Colors::Auto;
+
+	static inline bool with_colors() {
+		return colors == Colors::Auto ? isatty( STDERR_FILENO ) : bool(colors);
+	}
+
 	const std::string & error_str() {
-		static std::string str = isatty( STDERR_FILENO ) ? "\e[31merror:\e[39m " : "error: ";
+		static std::string str = with_colors() ? "\e[31merror:\e[39m " : "error: ";
 		return str;
 	}
 
 	const std::string & warning_str() {
-		static std::string str = isatty( STDERR_FILENO ) ? "\e[95mwarning:\e[39m " : "warning: ";
+		static std::string str = with_colors() ? "\e[95mwarning:\e[39m " : "warning: ";
 		return str;
 	}
 
 	const std::string & bold_ttycode() {
-		static std::string str = isatty( STDERR_FILENO ) ? "\e[1m" : "";
+		static std::string str = with_colors() ? "\e[1m" : "";
 		return str;
 	}
 
 	const std::string & reset_font_ttycode() {
-		static std::string str = isatty( STDERR_FILENO ) ? "\e[0m" : "";
+		static std::string str = with_colors() ? "\e[0m" : "";
 		return str;
 	}
Index: src/Common/SemanticError.h
===================================================================
--- src/Common/SemanticError.h	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/Common/SemanticError.h	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -97,4 +97,12 @@
 // Helpers
 namespace ErrorHelpers {
+	enum class Colors {
+		Never = false,
+		Always = true,
+		Auto,
+	};
+
+	extern Colors colors;
+
 	const std::string & error_str();
 	const std::string & warning_str();
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/Parser/parser.yy	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -1423,7 +1423,7 @@
 asm_operand:											// GCC
 	string_literal '(' constant_expression ')'
-		{ $$ = new ExpressionNode( new AsmExpr( maybeMoveBuild< Expression >( (ExpressionNode *)nullptr ), $1, maybeMoveBuild< Expression >( $3 ) ) ); }
-	| '[' constant_expression ']' string_literal '(' constant_expression ')'
-		{ $$ = new ExpressionNode( new AsmExpr( maybeMoveBuild< Expression >( $2 ), $4, maybeMoveBuild< Expression >( $6 ) ) ); }
+		{ $$ = new ExpressionNode( new AsmExpr( nullptr, $1, maybeMoveBuild< Expression >( $3 ) ) ); }
+	| '[' IDENTIFIER ']' string_literal '(' constant_expression ')'
+		{ $$ = new ExpressionNode( new AsmExpr( $2, $4, maybeMoveBuild< Expression >( $6 ) ) ); }
 	;
 
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/ResolvExpr/Resolver.cc	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -485,7 +485,4 @@
 		visit_children = false;
 		findVoidExpression( asmExpr->operand, indexer );
-		if ( asmExpr->get_inout() ) {
-			findVoidExpression( asmExpr->inout, indexer );
-		} // if
 	}
 
@@ -1365,9 +1362,4 @@
 		asmExpr = ast::mutate_field(
 			asmExpr, &ast::AsmExpr::operand, findVoidExpression( asmExpr->operand, symtab ) );
-
-		if ( asmExpr->inout ) {
-			asmExpr = ast::mutate_field(
-				asmExpr, &ast::AsmExpr::inout, findVoidExpression( asmExpr->inout, symtab ) );
-		}
 
 		return asmExpr;
Index: src/SynTree/Expression.cc
===================================================================
--- src/SynTree/Expression.cc	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/SynTree/Expression.cc	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -527,10 +527,10 @@
 }
 
-AsmExpr::AsmExpr( const AsmExpr & other ) : Expression( other ), inout( maybeClone( other.inout ) ), constraint( maybeClone( other.constraint ) ), operand( maybeClone( other.operand ) ) {}
+AsmExpr::AsmExpr( const AsmExpr & other ) : Expression( other ), inout( other.inout ), constraint( maybeClone( other.constraint ) ), operand( maybeClone( other.operand ) ) {}
 
 
 void AsmExpr::print( std::ostream & os, Indenter indent ) const {
 	os << "Asm Expression: " << std::endl;
-	if ( inout ) inout->print( os, indent+1 );
+	if ( !inout.empty() ) os <<  "[" << inout << "] ";
 	if ( constraint ) constraint->print( os, indent+1 );
 	if ( operand ) operand->print( os, indent+1 );
Index: src/SynTree/Expression.h
===================================================================
--- src/SynTree/Expression.h	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/SynTree/Expression.h	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -575,20 +575,11 @@
 class AsmExpr : public Expression {
   public:
-	Expression * inout;
+	std::string inout;
 	Expression * constraint;
 	Expression * operand;
 
-	AsmExpr( Expression * inout, Expression * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}
+	AsmExpr( const std::string * _inout, Expression * constraint, Expression * operand ) : inout( _inout ? *_inout : "" ), constraint( constraint ), operand( operand ) { delete _inout; }
 	AsmExpr( const AsmExpr & other );
-	virtual ~AsmExpr() { delete inout; delete constraint; delete operand; };
-
-	Expression * get_inout() const { return inout; }
-	void set_inout( Expression * newValue ) { inout = newValue; }
-
-	Expression * get_constraint() const { return constraint; }
-	void set_constraint( Expression * newValue ) { constraint = newValue; }
-
-	Expression * get_operand() const { return operand; }
-	void set_operand( Expression * newValue ) { operand = newValue; }
+	virtual ~AsmExpr() { delete constraint; delete operand; };
 
 	virtual AsmExpr * clone() const override { return new AsmExpr( * this ); }
Index: src/main.cc
===================================================================
--- src/main.cc	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ src/main.cc	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -407,8 +407,10 @@
 
 
-static const char optstring[] = ":hlLmNnpP:S:twW:D:";
+static const char optstring[] = ":c:ghlLmNnpP:S:twW:D:";
 
 enum { PreludeDir = 128 };
 static struct option long_opts[] = {
+	{ "colors", required_argument, nullptr, 'c' },
+	{ "gdb", no_argument, nullptr, 'g' },
 	{ "help", no_argument, nullptr, 'h' },
 	{ "libcfa", no_argument, nullptr, 'l' },
@@ -422,5 +424,4 @@
 	{ "statistics", required_argument, nullptr, 'S' },
 	{ "tree", no_argument, nullptr, 't' },
-	{ "gdb", no_argument, nullptr, 'g' },
 	{ "", no_argument, nullptr, 0 },					// -w
 	{ "", no_argument, nullptr, 0 },					// -W
@@ -430,19 +431,20 @@
 
 static const char * description[] = {
-	"print help message",								// -h
-	"generate libcfa.c",								// -l
-	"generate line marks",								// -L
-	"do not replace main",								// -m
-	"do not generate line marks",						// -N
-	"do not read prelude",								// -n
+	"diagnostic color: never, always, or auto.",          // -c
+	"wait for gdb to attach",                             // -g
+	"print help message",                                 // -h
+	"generate libcfa.c",                                  // -l
+	"generate line marks",                                // -L
+	"do not replace main",                                // -m
+	"do not generate line marks",                         // -N
+	"do not read prelude",                                // -n
 	"generate prototypes for prelude functions",		// -p
-	"print",											// -P
+	"print",                                              // -P
 	"<directory> prelude directory for debug/nodebug",	// no flag
 	"<option-list> enable profiling information:\n          counters,heap,time,all,none", // -S
-	"building cfa standard lib",									// -t
-	"wait for gdb to attach",									// -g
-	"",													// -w
-	"",													// -W
-	"",													// -D
+	"building cfa standard lib",                          // -t
+	"",                                                   // -w
+	"",                                                   // -W
+	"",                                                   // -D
 }; // description
 
@@ -512,4 +514,13 @@
 	while ( (c = getopt_long( argc, argv, optstring, long_opts, nullptr )) != -1 ) {
 		switch ( c ) {
+		  case 'c':										// diagnostic colors
+			if ( strcmp( optarg, "always" ) == 0 ) {
+				ErrorHelpers::colors = ErrorHelpers::Colors::Always;
+			} else if ( strcmp( optarg, "never" ) == 0 ) {
+				ErrorHelpers::colors = ErrorHelpers::Colors::Never;
+			} else if ( strcmp( optarg, "auto" ) == 0 ) {
+				ErrorHelpers::colors = ErrorHelpers::Colors::Auto;
+			} // if
+			break;
 		  case 'h':										// help message
 			usage( argv );								// no return
Index: tests/.expect/gccExtensions.x64.txt
===================================================================
--- tests/.expect/gccExtensions.x64.txt	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ tests/.expect/gccExtensions.x64.txt	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -12,5 +12,5 @@
     asm volatile ( "mov %1, %0\n\t" "add $1, %0" : "=" "r" ( _X3dsti_2 ) :  :  );
     asm volatile ( "mov %1, %0\n\t" "add $1, %0" : "=r" ( _X3dsti_2 ) : "r" ( _X3srci_2 ) :  );
-    asm ( "mov %1, %0\n\t" "add $1, %0" : "=r" ( _X3dsti_2 ), "=r" ( _X3srci_2 ) : [ _X3srci_2 ] "r" ( _X3dsti_2 ) : "r0" );
+    asm ( "mov %1, %0\n\t" "add $1, %0" : "=r" ( _X3dsti_2 ), "=r" ( _X3srci_2 ) : [ src ] "r" ( _X3dsti_2 ) : "r0" );
     L2: L1: asm goto ( "frob %%r5, %1; jc %l[L1]; mov (%2), %%r5" :  : "r" ( _X3srci_2 ), "r" ( (&_X3dsti_2) ) : "r5", "memory" : L1, L2 );
     double _Complex _X2c1Cd_2;
Index: tests/.expect/gccExtensions.x86.txt
===================================================================
--- tests/.expect/gccExtensions.x86.txt	(revision 1c40091dd8229cabc50b16e4bc98e6bc658b7fac)
+++ tests/.expect/gccExtensions.x86.txt	(revision 2909b515da780ffca5028f3b4173e37403df5629)
@@ -12,5 +12,5 @@
     asm volatile ( "mov %1, %0\n\t" "add $1, %0" : "=" "r" ( _X3dsti_2 ) :  :  );
     asm volatile ( "mov %1, %0\n\t" "add $1, %0" : "=r" ( _X3dsti_2 ) : "r" ( _X3srci_2 ) :  );
-    asm ( "mov %1, %0\n\t" "add $1, %0" : "=r" ( _X3dsti_2 ), "=r" ( _X3srci_2 ) : [ _X3srci_2 ] "r" ( _X3dsti_2 ) : "r0" );
+    asm ( "mov %1, %0\n\t" "add $1, %0" : "=r" ( _X3dsti_2 ), "=r" ( _X3srci_2 ) : [ src ] "r" ( _X3dsti_2 ) : "r0" );
     L2: L1: asm goto ( "frob %%r5, %1; jc %l[L1]; mov (%2), %%r5" :  : "r" ( _X3srci_2 ), "r" ( (&_X3dsti_2) ) : "r5", "memory" : L1, L2 );
     double _Complex _X2c1Cd_2;
