Index: libcfa/src/exception.c
===================================================================
--- libcfa/src/exception.c	(revision 921cd8222a6cdad5b6b7ba84b755a001b52169ba)
+++ libcfa/src/exception.c	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
@@ -248,13 +248,7 @@
 }
 
-#if defined(PIC)
-#warning Exceptions not yet supported when using Position-Independent Code
-__attribute__((noinline))
-void __cfaabi_ehm__try_terminate(void (*try_block)(),
-		void (*catch_block)(int index, exception_t * except),
-		__attribute__((unused)) int (*match_block)(exception_t * except)) {
-	abort();
-}
-#else // PIC
+#pragma GCC push_options
+#pragma GCC optimize("O0")
+
 // This is our personality routine. For every stack frame annotated with
 // ".cfi_personality 0x3,__gcfa_personality_v0" this function will be called twice when unwinding.
@@ -431,6 +425,11 @@
 
 	// Setup the personality routine and exception table.
+#ifdef __PIC__
+	asm volatile (".cfi_personality 0x9b,CFA.ref.__gcfa_personality_v0");
+	asm volatile (".cfi_lsda 0x1b, .LLSDACFA2");
+#else
 	asm volatile (".cfi_personality 0x3,__gcfa_personality_v0");
 	asm volatile (".cfi_lsda 0x3, .LLSDACFA2");
+#endif
 
 	// Label which defines the start of the area for which the handler is setup.
@@ -464,4 +463,55 @@
 // have a single call to the try routine.
 
+#ifdef __PIC__
+#if defined( __i386 ) || defined( __x86_64 )
+asm (
+	// HEADER
+	".LFECFA1:\n"
+	"	.globl	__gcfa_personality_v0\n"
+	"	.section	.gcc_except_table,\"a\",@progbits\n"
+	// TABLE HEADER (important field is the BODY length at the end)
+	".LLSDACFA2:\n"
+	"	.byte	0xff\n"
+	"	.byte	0xff\n"
+	"	.byte	0x1\n"
+	"	.uleb128 .LLSDACSECFA2-.LLSDACSBCFA2\n"
+	// BODY (language specific data)
+	// This uses language specific data and can be modified arbitrarily
+	// We use handled area offset, handled area length,
+	// handler landing pad offset and 1 (action code, gcc seems to use 0).
+	".LLSDACSBCFA2:\n"
+	"	.uleb128 .TRYSTART-__cfaabi_ehm__try_terminate\n"
+	"	.uleb128 .TRYEND-.TRYSTART\n"
+	"	.uleb128 .CATCH-__cfaabi_ehm__try_terminate\n"
+	"	.uleb128 1\n"
+	".LLSDACSECFA2:\n"
+	// TABLE FOOTER
+	"	.text\n"
+	"	.size	__cfaabi_ehm__try_terminate, .-__cfaabi_ehm__try_terminate\n"
+);
+
+// Somehow this piece of helps with the resolution of debug symbols.
+__attribute__((unused)) static const int dummy = 0;
+
+asm (
+	// Add a hidden symbol which points at the function.
+	"	.hidden	CFA.ref.__gcfa_personality_v0\n"
+	"	.weak	CFA.ref.__gcfa_personality_v0\n"
+	// No clue what this does specifically
+	"	.section	.data.rel.local.CFA.ref.__gcfa_personality_v0,\"awG\",@progbits,CFA.ref.__gcfa_personality_v0,comdat\n"
+	"	.align 8\n"
+	"	.type CFA.ref.__gcfa_personality_v0, @object\n"
+	"	.size CFA.ref.__gcfa_personality_v0, 8\n"
+	"CFA.ref.__gcfa_personality_v0:\n"
+#if defined( __x86_64 )
+	"	.quad __gcfa_personality_v0\n"
+#else // then __i386
+	"   .long __gcfa_personality_v0\n"
+#endif
+);
+#else
+#error Exception Handling: unknown architecture for position independent code.
+#endif // __i386 || __x86_64
+#else // __PIC__
 #if defined( __i386 ) || defined( __x86_64 )
 asm (
@@ -491,6 +541,10 @@
 	"	.size	__cfaabi_ehm__try_terminate, .-__cfaabi_ehm__try_terminate\n"
 	"	.ident	\"GCC: (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901\"\n"
-//	"	.section	.note.GNU-stack,\"x\",@progbits\n"
+	"	.section	.note.GNU-stack,\"x\",@progbits\n"
 );
+#else
+#error Exception Handling: unknown architecture for position dependent code.
 #endif // __i386 || __x86_64
-#endif // PIC
+#endif // __PIC__
+
+#pragma GCC pop_options
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision 921cd8222a6cdad5b6b7ba84b755a001b52169ba)
+++ src/ResolvExpr/Resolver.cc	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
@@ -84,4 +84,5 @@
 		void previsit( ThrowStmt * throwStmt );
 		void previsit( CatchStmt * catchStmt );
+		void postvisit( CatchStmt * catchStmt );
 		void previsit( WaitForStmt * stmt );
 
@@ -567,6 +568,28 @@
 
 	void Resolver_old::previsit( CatchStmt * catchStmt ) {
+		// Until we are very sure this invarent (ifs that move between passes have thenPart)
+		// holds, check it. This allows a check for when to decode the mangling.
+		if ( IfStmt * ifStmt = dynamic_cast<IfStmt *>( catchStmt->body ) ) {
+			assert( ifStmt->thenPart );
+		}
+		// Encode the catchStmt so the condition can see the declaration.
 		if ( catchStmt->cond ) {
-			findSingleExpression( catchStmt->cond, new BasicType( noQualifiers, BasicType::Bool ), indexer );
+			IfStmt * ifStmt = new IfStmt( catchStmt->cond, nullptr, catchStmt->body );
+			catchStmt->cond = nullptr;
+			catchStmt->body = ifStmt;
+		}
+	}
+
+	void Resolver_old::postvisit( CatchStmt * catchStmt ) {
+		// Decode the catchStmt so everything is stored properly.
+		IfStmt * ifStmt = dynamic_cast<IfStmt *>( catchStmt->body );
+		if ( nullptr != ifStmt && nullptr == ifStmt->thenPart ) {
+			assert( ifStmt->condition );
+			assert( ifStmt->elsePart );
+			catchStmt->cond = ifStmt->condition;
+			catchStmt->body = ifStmt->elsePart;
+			ifStmt->condition = nullptr;
+			ifStmt->elsePart = nullptr;
+			delete ifStmt;
 		}
 	}
@@ -1466,4 +1489,5 @@
 
 	const ast::CatchStmt * Resolver_new::previsit( const ast::CatchStmt * catchStmt ) {
+		// TODO: This will need a fix for the decl/cond scoping problem.
 		if ( catchStmt->cond ) {
 			ast::ptr< ast::Type > boolType = new ast::BasicType{ ast::BasicType::Bool };
Index: tests/exceptions/.expect/except-0.txt
===================================================================
--- tests/exceptions/.expect/except-0.txt	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
+++ tests/exceptions/.expect/except-0.txt	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
@@ -0,0 +1,51 @@
+Exiting: terminate function
+Exiting: bar function
+foo caught exception zen.
+Exiting: foo function
+
+alpha caught exception zen
+resume returned
+Exiting: resume function
+Exiting: beta function
+Exiting: alpha function
+
+walk out of farewell
+See you next time
+leaving farewell
+
+jump out of farewell
+See you next time
+leaving farewell
+
+Exiting: resume function
+fallback caught termination zen
+
+Exiting: terminate function
+Exiting: terminate function
+Exiting: terminate_swap
+terminate_swapped caught exception yang
+Exiting: terminate_swapped
+
+resume_swapped caught exception yang
+resume returned
+Exiting: resume function
+resume returned
+Exiting: resume function
+Exiting: resume_swap
+
+Exiting: terminate function
+reterminate zen caught and will rethrow exception zen
+reterminate 1 caught exception zen
+
+reresume zen caught and rethrows exception zen
+reresume 1 caught exception zen
+resume returned
+Exiting: resume function
+
+Exiting: terminate function
+fy caught exception zen
+fee caught exception zen
+resume returned
+Exiting: resume function
+
+Exiting: main function
Index: tests/exceptions/.expect/except-1.txt
===================================================================
--- tests/exceptions/.expect/except-1.txt	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
+++ tests/exceptions/.expect/except-1.txt	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
@@ -0,0 +1,13 @@
+First Caught
+Both Caught
+Part A Complete
+First Catch and rethrow
+Second Catch
+Part B Complete
+Throw before cleanup
+Catch after cleanup
+Part C Complete
+Caught initial throw.
+Caught intermediate throw.
+Caught final throw.
+Part D Complete
Index: tests/exceptions/.expect/except-2.txt
===================================================================
--- tests/exceptions/.expect/except-2.txt	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
+++ tests/exceptions/.expect/except-2.txt	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
@@ -0,0 +1,3 @@
+throw yin caught.
+throwResume yang caught <> throwResume returned.
+Should be printed.
Index: tests/exceptions/.expect/except-3.txt
===================================================================
--- tests/exceptions/.expect/except-3.txt	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
+++ tests/exceptions/.expect/except-3.txt	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
@@ -0,0 +1,1 @@
+throw [] unwind <> catch
Index: tests/exceptions/except-0.cfa
===================================================================
--- tests/exceptions/except-0.cfa	(revision 921cd8222a6cdad5b6b7ba84b755a001b52169ba)
+++ tests/exceptions/except-0.cfa	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
@@ -19,10 +19,10 @@
 };
 
-void ?{}(signal_exit * this, const char * area) {
-	this->area = area;
-}
-
-void ^?{}(signal_exit * this) {
-	printf("Exiting: %s\n", this->area);
+void ?{}(signal_exit & this, const char * area) {
+	this.area = area;
+}
+
+void ^?{}(signal_exit & this) {
+	printf("Exiting: %s\n", this.area);
 //	sout | "Exiting:" | this->area;
 }
@@ -242,6 +242,8 @@
 
 	// Uncaught termination test.
+	/* Removed due to non-deterministic output.
 	printf("Throw uncaught.\n");
 	yang z;
 	terminate(&z);
-}
+	*/
+}
Index: tests/exceptions/except-2.cfa
===================================================================
--- tests/exceptions/except-2.cfa	(revision 921cd8222a6cdad5b6b7ba84b755a001b52169ba)
+++ tests/exceptions/except-2.cfa	(revision 3b9c674d6b564a0b4f7d960bcd9069290dca19fa)
@@ -12,6 +12,6 @@
 	struct TABLE(BASE_EXCEPT) const * parent;
 	size_t size;
-	void (*copy)(num_error *this, num_error * other);
-	void (*free)(num_error *this);
+	void (*copy)(num_error &this, num_error & other);
+	void (*free)(num_error &this);
 	const char * (*msg)(num_error *this);
 	int (*code)(num_error *this);
@@ -28,5 +28,5 @@
 	if ( ! this->msg ) {
 		static const char * base = "Num Error with code: X";
-		this->msg = malloc(22);
+		this->msg = (char *)malloc(22);
 		for (int i = 0 ; (this->msg[i] = base[i]) ; ++i);
 	}
@@ -34,16 +34,16 @@
 	return this->msg;
 }
-void ?{}(num_error * this, int num) {
-	this->virtual_table = &INSTANCE(num_error);
-	this->msg = 0;
-	this->num = num;
+void ?{}(num_error & this, int num) {
+	this.virtual_table = &INSTANCE(num_error);
+	this.msg = 0;
+	this.num = num;
 }
-void ?{}(num_error * this, num_error * other) {
-	this->virtual_table = other->virtual_table;
-	this->msg = 0;
-	this->num = other->num;
+void ?{}(num_error & this, num_error & other) {
+	this.virtual_table = other.virtual_table;
+	this.msg = 0;
+	this.num = other.num;
 }
-void ^?{}(num_error * this) {
-	if( this->msg ) free( this->msg );
+void ^?{}(num_error & this) {
+	if( this.msg ) free( this.msg );
 }
 int num_error_code( num_error * this ) {
