Index: c/tests/.expect/ctor-autogen-ERR1.txt
===================================================================
--- src/tests/.expect/ctor-autogen-ERR1.txt	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,9 +1,0 @@
-ctor-autogen.c:102:1 error: No reasonable alternatives for expression Applying untyped: 
-  Name: ?{}
-...to: 
-  Cast of:
-    Variable Expression: x: instance of struct Managed with body 1 
-  ... to:
-    reference to instance of struct Managed with body 1 
-  constant expression (123 123: signed int)
-
Index: c/tests/.expect/ctor-autogen.txt
===================================================================
--- src/tests/.expect/ctor-autogen.txt	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,1 +1,0 @@
-
Index: c/tests/.expect/dtor-early-exit-ERR1.txt
===================================================================
--- src/tests/.expect/dtor-early-exit-ERR1.txt	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,4 +1,0 @@
-dtor-early-exit.c:153:1 error: jump to label 'L1' crosses initialization of y Branch (Goto)
-  with target: L1
-  with original target: L1
-
Index: c/tests/.expect/dtor-early-exit-ERR2.txt
===================================================================
--- src/tests/.expect/dtor-early-exit-ERR2.txt	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,4 +1,0 @@
-dtor-early-exit.c:220:1 error: jump to label 'L2' crosses initialization of y Branch (Goto)
-  with target: L2
-  with original target: L2
-
Index: c/tests/.expect/dtor-early-exit.txt
===================================================================
--- src/tests/.expect/dtor-early-exit.txt	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,220 +1,0 @@
-f i=0
-construct x
-construct y
-construct z
-destruct z
-destruct y
-destruct x
-f i=1
-construct x
-construct y
-construct z
-destruct z
-destruct y
-destruct x
-f i=2
-construct x
-construct y
-construct z
-destruct z
-destruct y
-destruct x
-f i=3
-construct x
-construct y
-construct z
-destruct z
-destruct y
-destruct x
-
-g for i=0
-construct x
-destruct x
-g for i=1
-construct x
-destruct x
-g for i=2
-construct x
-destruct x
-g for i=3
-construct x
-destruct x
-g for i=4
-construct x
-destruct x
-g for i=5
-construct x
-destruct x
-g for i=6
-construct x
-destruct x
-g for i=7
-construct x
-destruct x
-g for i=8
-construct x
-destruct x
-g for i=9
-construct x
-destruct x
-
-g while i=0
-construct x
-destruct x
-g while i=1
-construct x
-destruct x
-g while i=2
-construct x
-destruct x
-g while i=3
-construct x
-destruct x
-g while i=4
-construct x
-destruct x
-g while i=5
-construct x
-destruct x
-g while i=6
-construct x
-destruct x
-g while i=7
-construct x
-destruct x
-g while i=8
-construct x
-destruct x
-g while i=9
-construct x
-destruct x
-
-construct y
-g switch i=0
-destruct y
-construct y
-g switch i=1
-destruct y
-construct y
-g switch i=2
-destruct y
-construct y
-g switch i=3
-destruct y
-construct y
-g switch i=4
-destruct y
-construct y
-g switch i=5
-destruct y
-construct y
-g switch i=6
-destruct y
-construct y
-g switch i=7
-destruct y
-construct y
-g switch i=8
-destruct y
-construct y
-g switch i=9
-destruct y
-
-g for k=0
-g for i=0
-construct x
-g for j=0
-construct y
-continue L2
-destruct y
-g for j=1
-construct y
-break L2
-destruct y
-destruct x
-g for i=1
-construct x
-g for j=0
-construct y
-continue L2
-destruct y
-g for j=1
-construct y
-break L2
-destruct y
-destruct x
-g for i=2
-construct x
-continue L1
-destruct x
-g for i=3
-construct x
-break L1
-destruct x
-g for k=1
-g for i=0
-construct x
-g for j=0
-construct y
-continue L2
-destruct y
-g for j=1
-construct y
-break L2
-destruct y
-destruct x
-g for i=1
-construct x
-g for j=0
-construct y
-continue L2
-destruct y
-g for j=1
-construct y
-break L2
-destruct y
-destruct x
-g for i=2
-construct x
-continue L1
-destruct x
-g for i=3
-construct x
-break L1
-destruct x
-
-construct w
-construct v
-break L3
-destruct v
-destruct w
-
-h
-construct y
-L1
-construct x
-L2
-goto L1
-destruct x
-L1
-construct x
-L2
-goto L2
-L2
-goto L3
-L3
-goto L2-2
-L2
-goto L4
-destruct x
-destruct y
-L4
-goto L0
-construct y
-L1
-construct x
-L2
-goto L4
-destruct x
-destruct y
-L4
Index: c/tests/.expect/globals.txt
===================================================================
--- src/tests/.expect/globals.txt	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,9 +1,0 @@
-static		inline		autogen		value
-no 		no 		no 		22
-no 		no 		yes		22
-no 		yes		no 		22
-no 		yes		yes		22
-yes		no 		no 		22
-yes		no 		yes		22
-yes		yes		no 		22
-yes		yes		yes		22
Index: c/tests/.expect/memberCtors-ERR1.txt
===================================================================
--- src/tests/.expect/memberCtors-ERR1.txt	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,1 +1,0 @@
-memberCtors.c:71:1 error: in void ?{}(B &b), field a2 used before being constructed
Index: c/tests/.expect/memberCtors.txt
===================================================================
--- src/tests/.expect/memberCtors.txt	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,213 +1,0 @@
-Before declaration of b1
-constructing int
-constructing int
-constructing int
-constructing int
-constructing int
-constructing int
-begin construct B
-assign b.a2
-constructing int
-constructing int
-begin construct A
-construct a.x
-constructing int: 1001
-assign a.y
-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
-constructing int
-begin construct A
-construct a.x
-constructing int: 1000
-assign a.y
-assigning int: 0 0
-end construct A
-end construct B
-destructing int: 0
-destructing int: 0
-destructing int: 1001
-Before declaration of b2
-copy constructing int: 0
-copy constructing int: 0
-begin copy construct A
-copy construct this.x
-copy constructing int: 1000
-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
-constructing int
-constructing int
-begin construct A
-construct a.x
-constructing int: 999
-assign a.y
-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
-destructing int: 1000
-destructing int: 0
-destructing int: 0
-destructing int: 999
-destructing int: 0
-destructing int: 0
-destructing int: 0
-destructing int: 0
-destructing int: 0
-destructing int: 999
-constructing int
-constructing int
-begin construct A
-construct a.x
-constructing int: 999
-assign a.y
-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
-destructing int: 1000
-destructing int: 0
-destructing int: 0
-destructing int: 999
-destructing int: 0
-destructing int: 0
-destructing int: 0
-destructing int: 0
-destructing int: 0
-destructing int: 999
Index: c/tests/.expect/multiDimension.txt
===================================================================
--- src/tests/.expect/multiDimension.txt	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,304 +1,0 @@
-constructing with 1
-constructing with 2
-constructing with 3
-constructing with 4
-constructing with 5
-constructing with 6
-constructing with 7
-constructing with 8
-constructing with 9
-constructing with 10
-constructing with 1
-constructing with 2
-constructing with 3
-constructing with 4
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-constructing with 1234567
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-constructing with 1
-constructing with 2
-constructing with 3
-constructing with 4
-constructing with 5
-constructing with 6
-constructing with 7
-constructing with 8
-constructing with 9
-constructing with 0
-constructing with 0
-constructing with 0
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-default constructing
-constructing with 999
-constructing with 1111
-default constructing
-default constructing
-constructing with 1
-constructing with 2
-constructing with 3
-constructing with 4
-default constructing
-default constructing
-default constructing
-default constructing
-constructing with 0
-default constructing
-default constructing
-default constructing
-constructing with 11
-constructing with 22
-constructing with 33
-constructing with 55
-constructing with 66
-default constructing
-constructing with 77
-default constructing
-default constructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
-destructing
Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ src/tests/Makefile.am	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -77,10 +77,4 @@
 	${CC} ${AM_CFLAGS} ${CFLAGS} ${<} -o ${@}
 
-dtor-early-exit-ERR1: dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@
-	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
-
-dtor-early-exit-ERR2: dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@
-	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 ${<} -o ${@}
-
 declarationSpecifier: declarationSpecifier.c @CFA_BINDIR@/@CFA_NAME@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
@@ -110,10 +104,4 @@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -lgmp ${<} -o ${@}
 
-memberCtors-ERR1: memberCtors.c @CFA_BINDIR@/@CFA_NAME@
-	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
-
-ctor-autogen-ERR1: ctor-autogen.c @CFA_BINDIR@/@CFA_NAME@
-	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
-
 completeTypeError : completeTypeError.c @CFA_BINDIR@/@CFA_NAME@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
@@ -124,2 +112,16 @@
 alloc-ERROR: alloc.c @CFA_BINDIR@/@CFA_NAME@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
+
+# Constructor/destructor tests
+raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
+
+raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 ${<} -o ${@}
+
+raii/memberCtors-ERR1: raii/memberCtors.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
+
+raii/ctor-autogen-ERR1: raii/ctor-autogen.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
+
Index: src/tests/Makefile.in
===================================================================
--- src/tests/Makefile.in	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ src/tests/Makefile.in	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -827,10 +827,4 @@
 	${CC} ${AM_CFLAGS} ${CFLAGS} ${<} -o ${@}
 
-dtor-early-exit-ERR1: dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@
-	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
-
-dtor-early-exit-ERR2: dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@
-	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 ${<} -o ${@}
-
 declarationSpecifier: declarationSpecifier.c @CFA_BINDIR@/@CFA_NAME@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
@@ -860,10 +854,4 @@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -lgmp ${<} -o ${@}
 
-memberCtors-ERR1: memberCtors.c @CFA_BINDIR@/@CFA_NAME@
-	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
-
-ctor-autogen-ERR1: ctor-autogen.c @CFA_BINDIR@/@CFA_NAME@
-	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
-
 completeTypeError : completeTypeError.c @CFA_BINDIR@/@CFA_NAME@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
@@ -873,4 +861,17 @@
 
 alloc-ERROR: alloc.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
+
+# Constructor/destructor tests
+raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
+
+raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 ${<} -o ${@}
+
+raii/memberCtors-ERR1: raii/memberCtors.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
+
+raii/ctor-autogen-ERR1: raii/ctor-autogen.c @CFA_BINDIR@/@CFA_NAME@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
 
Index: c/tests/ctor-autogen.c
===================================================================
--- src/tests/ctor-autogen.c	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,153 +1,0 @@
-// TODO: add error cases (e.g., use of field constructors for managed types, etc.)
-
-enum Color { R, G, B };
-
-// empty struct/union should have generated ctor/dtors
-union U {};
-struct S {};
-
-struct SimpleUnion {
-	int x;
-	double y;
-	char z;
-};
-
-struct SimpleStruct {
-	int x;
-	double y;
-	char z;
-};
-
-// struct/union with members with generated ctor/dtors should themselves have generated ctor/dtors
-union PopulatedUnion {
-	Color c;
-	U u;
-	S s;
-};
-
-struct PopulatedStruct {
-	Color c;
-	U u;
-	S s;
-};
-
-// dtype-static generic type is otype
-forall(dtype T)
-struct DtypeStaticStruct {
-  T * data;
-  short size;
-};
-
-forall(dtype T)
-union DtypeStaticUnion {
-  T * data;
-  short size;
-};
-
-// dynamic generic type is otype
-forall(otype T)
-struct DynamicStruct {
-	T x;
-};
-
-forall(otype T)
-union DynamicUnion {
-	T x;
-};
-
-// struct/union that contains a generic type is
-struct GenericContainingStruct {
-	DynamicStruct(int) dsi;
-	DynamicStruct(double) dsd;
-	DynamicUnion(int) dui;
-	DynamicUnion(double) dud;
-	DtypeStaticStruct(int) dssi;
-	DtypeStaticStruct(float) dssf;
-	DtypeStaticUnion(int) dsui;
-	DtypeStaticUnion(float) dsuf;
-};
-
-union GenericContainingUnion {
-	DynamicStruct(int) dsi;
-	DynamicStruct(double) dsd;
-	DynamicUnion(int) dui;
-	DynamicUnion(double) dud;
-	DtypeStaticStruct(int) dssi;
-	DtypeStaticStruct(float) dssf;
-	DtypeStaticUnion(int) dsui;
-	DtypeStaticUnion(float) dsuf;
-};
-
-
-forall(otype T)
-T identity(T x) { return x; }
-
-// can identity e if only sized or only the assertion, but the combination breaks...
-// forall(dtype T | sized(T) | { void ?{}(T &); })
-// void identity(T x) {  }
-
-#if ERR1
-// managed type - defines a constructor - can't use field constructors
-struct Managed {
-	int x;
-};
-
-void ?{}(Managed & m) { m.x = 0; }
-
-// managed type since it contains a managed type - can't use field constructors
-struct InheritManaged {
-	Managed m;
-};
-
-Managed x = { 123 }; // error
-Managed y;           // okay
-
-InheritManaged z = { y };  // error?
-#endif
-
-int main() {
-	S s;
-	U u;
-	Color e;
-
-	// identity(R);  Color constant should be Color which is otype
-	identity(e);  // Color should be an otype
-	identity(u);  // U should be an otype
-	identity(s);  // S should be an otype
-
-	SimpleStruct ss;
-	SimpleUnion su;
-
-	identity(ss);
-	identity(su);
-
-	PopulatedStruct ps;
-	PopulatedUnion pu;
-
-	identity(ps); // should recursively be an otype
-	identity(pu); // should recursively be an otype
-
-	DynamicStruct(int) dsi;
-	DynamicStruct(double) dsd;
-	DynamicUnion(int) dui;
-	DynamicUnion(double) dud;
-	DtypeStaticStruct(int) dssi;
-	DtypeStaticStruct(float) dssf;
-	DtypeStaticUnion(int) dsui;
-	DtypeStaticUnion(float) dsuf;
-
-	identity(dsi);
-	identity(dsd);
-	// identity(dui); // xxx - codegen errors in generated thunk _temp3 (Box-pass-generated assignment return-temporary)
-	// identity(dud);
-	identity(dssi);
-	identity(dssf);
-	identity(dsui);
-	identity(dsuf);
-
-	GenericContainingStruct gcs;
-	GenericContainingUnion gcu;
-
-	identity(gcs);
-	identity(gcu);
-}
Index: c/tests/dtor-early-exit.c
===================================================================
--- src/tests/dtor-early-exit.c	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,256 +1,0 @@
-//
-// 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.
-//
-// dtor-early-exit.c --
-//
-// Author           : Rob Schluntz
-// Created On       : Wed Aug 17 08:26:25 2016
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Aug 17 08:29:37 2016
-// Update Count     : 2
-//
-
-#include <fstream>
-#include <stdlib>
-extern "C" {
-#define false ((int)0)	// until stdbool.h works
-#define assert(cond) if (! (cond)) { sout | "Assertion failed: (" | #cond | ") at " __FILE__ | ":" | __LINE__ | endl; abort(); }
-}
-
-struct A {
-	const char * name;
-	int * x;
-};
-
-// don't want these called
-void ?{}(A & a) { assert( false ); }
-void ?{}(A & a, const char * name) { a.name = name; sout | "construct " | name | endl; a.x = (int*)malloc(); }
-void ?{}(A & a, const char * name, int * ptr) { assert( false ); }
-
-A ?=?(A & a, A b) {  sout | "assign " | a.name | " " | b.name; return a; }
-void ?{}(A & a, A b) { sout | "copy construct " | b.name | endl; a.x = (int*)malloc(); }
-void ^?{}(A & a) { sout | "destruct " | a.name | endl; free(a.x); }
-
-// test returns
-void f(int i) {
-	sout | "f i=" | i | endl;
-	A x = { "x" };  // construct x
-	{
-		A y = { "y" }; // construct y
-		{
-			A z = { "z" }; // construct z
-			{
-				if (i == 0) return; // destruct x, y, z
-			}
-			if (i == 1) return; // destruct x, y, z
-			// destruct z
-		}
-		if (i == 2) return; // destruct x, y
-		// destruct y
-	}
-	return; // destruct x
-}
-
-// test loops, switch, etc.
-void g() {
-	for (int i = 0; i < 10; i++) {
-		sout | "g for i=" | i | endl;
-		A x = { "x" };
-		// construct x
-		// destruct x
-	}
-	sout | endl;
-	{
-		int i = 0;
-		while (i < 10) {
-			sout | "g while i=" | i | endl;
-			A x = { "x" };
-			// construct x
-			i++;
-			// destruct x
-		}
-	}
-	sout | endl;
-	for (int i = 0; i < 10; i++) {
-		switch(10) {
-			case 0:
-			case 5:
-			case 10: {
-				A y = { "y" };
-				sout | "g switch i=" | i | endl;
-				// construct y
-				break; // destruct y
-			}
-			default: {
-				sout | "g switch i=" | i | endl;
-				A x = { "x" };
-				// construct x
-				break; // destruct x
-			}
-		}
-	}
-	sout | endl;
-	for (int k = 0; k < 2; k++) {
-		sout | "g for k=" | k | endl;
-		L1: for (int i = 0; i < 10; i++) {
-			sout | "g for i=" | i | endl;
-
-			A x = { "x" };
-			if (i == 2) {
-				sout | "continue L1" | endl;
-				continue;  // destruct x
-			} else if (i == 3) {
-				sout | "break L1" | endl;
-				break;  // destruct x
-			}
-
-			L2: for (int j = 0; j < 10; j++) {
-				sout | "g for j=" | j | endl;
-				A y = { "y" };
-				if (j == 0) {
-					sout | "continue L2" | endl;
-					continue; // destruct y - missing because object that needs to be destructed is not a part of this block, it's a part of the for's block
-				} else if (j == 1) {
-					sout | "break L2" | endl;
-					break;  // destruct y
-				} else if (i == 1) {
-					sout | "continue L1" | endl;
-					continue L1; // destruct x,y - note: continue takes you to destructors for block, so only generate destructor for y
-				} else if (k == 1) {
-					sout | "break L1" | endl;
-					break L1;  // destruct x,y
-				}
-			}
-		}
-	}
-
-	sout | endl;
-	L3: if( 3 ) {
-		A w = { "w" };
-		if( 4 ) {
-			A v = { "v" };
-			sout | "break L3" | endl;
-			break L3;
-		}
-	}
-}
-
-// test goto
-void h() {
-	int i = 0;
-	// for each goto G with target label L:
-	// * find all constructed variables alive at G (set S_G)
-	// * find all constructed variables alive at L (set S_L)
-	// * if S_L-S_G is non-empty, error
-	// * emit destructors for all variables in S_G-S_L
-	sout | "h" | endl;
-	{
-		L0: ;
-#ifdef ERR1
-			goto L1; // this is an error in g++ because it skips initialization of y
-#endif
-			A y = { "y" };
-			// S_L1 = { y }
-		L1: sout | "L1" | endl;
-			A x = { "x" };
-			// S_L2 = { y, x }
-		L2: sout | "L2" | endl;
-			if (i == 0) {
-				++i;
-				sout | "goto L1" | endl;
-				// S_G = { y, x }
-				goto L1;  // jump back, destruct b/c before x definition
-				// S_L-S_G = {} => no error
-				// S_G-S_L = { x } => destruct x
-			} else if (i == 1) {
-				++i;
-				sout | "goto L2" | endl;
-				// S_G = { y, x }
-				goto L2;  // jump back, do not destruct
-				// S_L-S_G = {}
-				// S_G-S_L = {} => destruct nothing
-			} else if (i == 2) {
-				++i;
-				sout | "goto L3" | endl;
-				// S_G = { y, x }
-				goto L3;  // jump ahead, do not destruct
-				// S_L-S_G = {}
-				// S_G-S_L = {}
-			} else if (false) {
-				++i;
-				A z = { "z" };
-				sout | "goto L3-2" | endl;
-				// S_G = { z, y, x }
-				goto L3;
-				// S_L-S_G = {}
-				// S_G-S_L = {z} => destruct z
-			} else {
-				++i;
-				sout | "goto L4" | endl;
-				// S_G = { y, x }
-				goto L4;  // jump ahead, destruct b/c left block x was defined in
-				// S_L-S_G = {}
-				// S_G-S_L = { y, x } => destruct y, x
-			}
-			// S_L3 = { y, x }
-		L3: sout | "L3" | endl;
-			sout | "goto L2-2" | endl;
-			// S_G = { y, x }
-			goto L2; // jump back, do not destruct
-			// S_L-S_G = {}
-			// S_G-S_L = {}
-	}
-	// S_L4 = {}
-	L4: sout | "L4" | endl;
-	if (i == 4) {
-		sout | "goto L0" | endl;
-		// S_G = {}
-		goto L0;
-		// S_L-S_G = {}
-		// S_G-S_L = {}
-	}
-#ifdef ERR2
-	// S_G = {}
-	if (i == 5) goto L2; // this is an error in g++ because it skips initialization of y, x
-	// S_L-S_G = { y, x } => non-empty, so error
-#endif
-}
-
-// TODO: implement __label__ and uncomment these lines
-void computedGoto() {
-  // __label__ bar;
-  void *ptr;
-  ptr = &&foo;
-  goto *ptr;
-  assert(false);
-foo: ;
-//   void f() {
-//     ptr = &&bar;
-//     goto *ptr;
-//     assert(false);
-//   }
-//   f();
-//   assert(false);
-// bar: ;
-}
-
-int main() {
-	sepDisable(sout);
-	for (int i = 0; i < 4; i++) {
-		f(i);
-	}
-	sout | endl;
-	g();
-	sout | endl;
-	h();
-
-	computedGoto();
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// compile-command: "cfa dtor-early-exit" //
-// End: //
Index: c/tests/globals.c
===================================================================
--- src/tests/globals.c	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,83 +1,0 @@
-#include <fstream>
-
-struct value_t {
-	int value;
-};
-
-void ?{}( value_t & this ) { this.value = 22; }
-
-//Standard case
-struct g_t {
-	value_t val;
-};
-
-void ?{}( g_t & this ) { (this.val){}; }
-
-g_t g;
-
-//Autogen case
-struct ga_t {
-	value_t val;
-};
-
-ga_t ga;
-
-//Inline case
-struct gi_t;
-void ?{}( gi_t & this );
-
-struct gi_t {
-	value_t val;
-} gi;
-
-void ?{}( gi_t & this ) { (this.val){}; }
-
-//Inline autogen case
-struct gia_t {
-	value_t val;
-} gia;
-
-//Static case
-struct gs_t {
-	value_t val;
-};
-
-void ?{}( gs_t & this ) { (this.val){}; }
-
-static gs_t gs;
-
-//Static autogen case
-struct gsa_t {
-	value_t val;
-};
-
-static gsa_t gsa;
-
-//Static inline case
-struct gsi_t;
-void ?{}( gsi_t & this );
-
-static struct gsi_t {
-	value_t val;
-} gsi;
-
-void ?{}( gsi_t & this ) { (this.val){}; }
-
-//Static inline autogen case
-static struct gsia_t {
-	value_t val;
-} gsia;
-
-int main() {
-	sout | "static\t\tinline\t\tautogen\t\tvalue" | endl;
-
-	sout | "no \t\tno \t\tno \t\t" | g.val.value    | endl;
-	sout | "no \t\tno \t\tyes\t\t" | ga.val.value   | endl;
-	sout | "no \t\tyes\t\tno \t\t" | gi.val.value   | endl;
-	sout | "no \t\tyes\t\tyes\t\t" | gia.val.value  | endl;
-	sout | "yes\t\tno \t\tno \t\t" | gs.val.value   | endl;
-	sout | "yes\t\tno \t\tyes\t\t" | gsa.val.value  | endl;
-	sout | "yes\t\tyes\t\tno \t\t" | gsi.val.value  | endl;
-	sout | "yes\t\tyes\t\tyes\t\t" | gsia.val.value | endl;
-
-}
Index: c/tests/init_once.c
===================================================================
--- src/tests/init_once.c	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,195 +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.
-//
-// init_once.c --
-//
-// Author           : Rob Schluntz
-// Created On       : Tue Jun 14 15:43:35 2016
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul  9 11:30:29 2016
-// Update Count     : 3
-//
-
-// want to ensure ctor/dtor called at most once per object.
-// whole point of ctor/dtor is that you don't know what's in
-// memory when it's first called, so can't rely on member to
-// determine if this is true. instead, keep an array
-// of addresses that have been constructed and remove the element
-// when it's destructed (and vice-versa)
-
-//*** setup
-extern "C" {
-#define NULL 0
-void * malloc(size_t);
-void free(void *);
-#define assert(cond) if (! (cond)) { printf("Assertion failed: (%s) at %s:%d\n", #cond, __FILE__, __LINE__); abort(); }
-void *memset(void *s, int c, size_t n);
-}
-
-// dummy type
-struct init_once { int * x; };
-
-// array and operations
-// const int size = 1024;
-#define size 1024
-struct array {
-	init_once * elems[size];
-	int length;
-};
-void remove(array * arr, init_once * x) {
-	for (int i = 0; i < arr->length; i++) {
-		if ( arr->elems[i] == x ) {
-			arr->elems[i] = arr->elems[--arr->length];
-			return;
-		}
-	}
-}
-void insert(array * arr, init_once * x) {
-	assert( arr->length < size );
-	arr->elems[arr->length++] = x;
-}
-int find(array * arr, init_once * x) {
-	for (int i = 0; i < arr->length; i++) {
-		if ( arr->elems[i] == x ) {
-			return i;
-		}
-	}
-	return -1;
-}
-void ?{}(array & arr) {
-	memset(arr.elems, 0, sizeof(arr.elems));
-	arr.length = 0;
-}
-array constructed;
-array destructed;
-
-void ?{}(init_once & x) {
-	assert( find( &constructed, &x ) == -1 );
-	remove( &destructed, &x );
-	insert( &constructed, &x );
-
-	x.x = (int *)malloc(sizeof(int));
-}
-
-void ?{}(init_once & x, init_once other) {
-	x{};  // reuse default ctor
-}
-
-void ^?{}(init_once & x) {
-	assert( find( &destructed, &x ) == -1 );
-	remove( &constructed, &x );
-	insert( &destructed, &x );
-
-	free(x.x);
-}
-//*** end setup
-
-// test globals
-init_once x;
-init_once y = x;
-
-void static_variable() {
-	static init_once x;
-}
-
-int main() {
-	// local variables
-	init_once x;
-	init_once y = x;
-
-	// block scoped variables
-	{
-		init_once x;
-		init_once y = x;
-	}
-
-	// loop variables
-	for (int i = 0 ; i < 10; i++) {
-		init_once x;
-		init_once y = x;
-	}
-	int i = 0;
-	while (i < 10) {
-		init_once x;
-		init_once y = x;
-		i++;
-	}
-
-	// declared in a switch block with a break
-	for (int i = 0; i < 10; i++) {
-		switch (10) {
-			case 1: {
-				init_once x;
-				init_once y = x;
-				x{}; // ensure this doesn't execute
-				break;
-			}
-			case 10: {
-				init_once x;
-				init_once y = x;
-			} // fall through
-			default: {
-				init_once x;
-				init_once y = x;
-				break;
-			}
-		}
-	}
-
-	// labeled break/continue
-	L3: for (int k = 0; k < 10; k++) {
-		init_once x;
-		init_once y = x;
-		L1: for (int i = 0; i < 10; i++){
-			init_once x;
-			init_once y = x;
-			L2: for (int j = 0; j < 10; j++) {
-				init_once x;
-				init_once y = x;
-
-				if (i == 0) continue L1;
-				if (i == 1) continue L2;
-				if (i == 2) break L2;
-				if (i == 3) break L1;
-				if (i == 4) continue L3;
-				if (i == 9) break L3;
-				// if (i == 5) goto ;
-			}
-		}
-	}
-
-	// labeled break/continue with if
-	LL1: for (int k = 0; k < 10; k++) {
-		init_once x;
-		init_once y = x;
-		LL2: for (int i = 0; i < 10; i++){
-			init_once x;
-			init_once y = x;
-			LL3: if( i < 5) {
-				init_once x;
-				init_once y = x;
-
-				if (i == 0) continue LL2;
-				if (i == 2) break LL3;
-				if (i == 3) break LL2;
-				if (i == 4) continue LL1;
-			} else {
-				if (i == 9) break LL1;
-				// if (i == 5) goto ;
-			}
-		}
-	}
-
-	// function-scoped static variable
-	for (int i = 0; i < 10; i++) {
-		static_variable();
-	}
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// compile-command: "cfa init_once.c" //
-// End: //
Index: c/tests/memberCtors.c
===================================================================
--- src/tests/memberCtors.c	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,91 +1,0 @@
-struct WrappedInt {
-  int x;
-};
-
-void ?{}(WrappedInt & this) {
-  printf("constructing int\n");
-  this.x = 0;
-}
-
-void ?{}(WrappedInt & this, WrappedInt other) {
-  printf("copy constructing int: %d\n", other.x);
-  this.x = other.x;
-}
-
-void ?{}(WrappedInt & this, int x) {
-  printf("constructing int: %d\n", x);
-  this.x = x;
-}
-
-void ^?{}(WrappedInt & this) {
-  printf("destructing int: %d\n", this.x);
-}
-
-void ?=?(WrappedInt & this, int x) {
-  printf("assigning int: %d %d\n", this.x, x);
-  this.x = x;
-}
-
-struct A {
-  WrappedInt x, y, z;
-};
-
-void ?{}(A & a) {
-  // currently must define default ctor, since there's no "= default" syntax
-}
-
-void ?{}(A & a, int x) {
-  printf("begin construct A\n");
-  printf("construct a.x\n");
-  (a.x){ x+999 };
-  printf("assign a.y\n");
-  a.y = 0; // not a constructor - default constructor will be inserted
-  printf("end construct A\n");
-} // z never constructed - will be automatically default constructed
-
-void ?{}(A & this, A other) {
-  printf("begin copy construct A\n");
-  printf("copy construct this.x\n");
-  (this.x){ other.x };
-  printf("assign this.y\n");
-  this.y = other.y; // not a constructor - copy constructor will be inserted
-  printf("end copy construct A\n");
-} // 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;
-};
-
-void ?{}(B & b) {
-  printf("begin construct B\n");
-  printf("assign b.a2\n");
-  b.a2 = (A) { 2 };
-  printf("construct b.a1\n");
-  (b.a1){ 1 };
-#ifdef ERR1
-  (b.a2){ b.a3 }; // error, b->a2 was used previously but is explicitly constructed
-#endif
-  printf("end construct B\n");
-} // a2, a3 never constructed - will be automatically default constructed
-
-void ^?{}(B & b) {
-  b.a2 = (A) { 0 };
-  ^(b.a1){};
-} // a2, a3 never destructed - will be automatically destructed
-
-int main() {
-  printf("Before declaration of b1\n");
-  B b1;
-  printf("Before declaration of b2\n");
-  B b2 = b1;
-  printf("End of main\n");
-}
Index: c/tests/multiDimension.c
===================================================================
--- src/tests/multiDimension.c	(revision eb0aedbaf6314c925dca18aa088dd6056485b500)
+++ 	(revision )
@@ -1,75 +1,0 @@
-struct X {
-  int a;
-  int * ptr;
-};
-
-void ?{}(X & this) {
-  printf("default constructing\n");
-  (this.a){ 123 };
-  this.ptr = (int *)malloc(sizeof(int));
-}
-
-void ?{}(X & this, X other) {
-  printf("copy constructing\n");
-  (this.a){ other.a };
-  this.ptr = (int *)malloc(sizeof(int));
-}
-
-void ?{}(X & this, int a) {
-  printf("constructing with %d\n", a);
-  (this.a){ a };
-  this.ptr = (int *)malloc(sizeof(int));
-}
-
-void ^?{}(X & this) {
-  printf("destructing\n");
-  free(this.ptr);
-}
-
-X ?=?(X & this, X other) {
-  this.a = other.a;
-  return this;
-}
-
-X global[10][10] = {
-  { 1, { 2 }, { 3 }, { 4 }, 5, 6, 7, 8, 9, 10, 11, 12 },
-  { 1, 2, 3, 4 },
-  { { 1234567 } }
-};
-
-X global2[3][3][3] = {
-  {
-    { 1, 2, 3 },
-    { 4, 5, 6 },
-    { 7, 8, 9 },
-    { 10, 11, 12 }
-  },
-  {
-    { 0, 0, 0 }
-  }
-};
-
-int foo() {
-  static X abc[3][3] = {
-    { 11, 22, 33, 44 },
-    { 55, 66 },
-    { 77 },
-    { 88, 99, 1010 }
-  };
-}
-
-// ensure constructed const arrays continue to compile
-const int global[1] = { -2 };
-
-int main() {
-  X abc[4][4] = {
-    { 999, 1111 },
-    { 1, 2, 3, 4, 5 },
-    {},
-    { 0 },
-    { 88 }
-  };
-
-  foo();
-  foo();
-}
Index: src/tests/raii/.expect/ctor-autogen-ERR1.txt
===================================================================
--- src/tests/raii/.expect/ctor-autogen-ERR1.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/.expect/ctor-autogen-ERR1.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,9 @@
+raii/ctor-autogen.c:102:1 error: No reasonable alternatives for expression Applying untyped: 
+  Name: ?{}
+...to: 
+  Cast of:
+    Variable Expression: x: instance of struct Managed with body 1 
+  ... to:
+    reference to instance of struct Managed with body 1 
+  constant expression (123 123: signed int)
+
Index: src/tests/raii/.expect/dtor-early-exit-ERR1.txt
===================================================================
--- src/tests/raii/.expect/dtor-early-exit-ERR1.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/.expect/dtor-early-exit-ERR1.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,4 @@
+raii/dtor-early-exit.c:153:1 error: jump to label 'L1' crosses initialization of y Branch (Goto)
+  with target: L1
+  with original target: L1
+
Index: src/tests/raii/.expect/dtor-early-exit-ERR2.txt
===================================================================
--- src/tests/raii/.expect/dtor-early-exit-ERR2.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/.expect/dtor-early-exit-ERR2.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,4 @@
+raii/dtor-early-exit.c:220:1 error: jump to label 'L2' crosses initialization of y Branch (Goto)
+  with target: L2
+  with original target: L2
+
Index: src/tests/raii/.expect/dtor-early-exit.txt
===================================================================
--- src/tests/raii/.expect/dtor-early-exit.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/.expect/dtor-early-exit.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,220 @@
+f i=0
+construct x
+construct y
+construct z
+destruct z
+destruct y
+destruct x
+f i=1
+construct x
+construct y
+construct z
+destruct z
+destruct y
+destruct x
+f i=2
+construct x
+construct y
+construct z
+destruct z
+destruct y
+destruct x
+f i=3
+construct x
+construct y
+construct z
+destruct z
+destruct y
+destruct x
+
+g for i=0
+construct x
+destruct x
+g for i=1
+construct x
+destruct x
+g for i=2
+construct x
+destruct x
+g for i=3
+construct x
+destruct x
+g for i=4
+construct x
+destruct x
+g for i=5
+construct x
+destruct x
+g for i=6
+construct x
+destruct x
+g for i=7
+construct x
+destruct x
+g for i=8
+construct x
+destruct x
+g for i=9
+construct x
+destruct x
+
+g while i=0
+construct x
+destruct x
+g while i=1
+construct x
+destruct x
+g while i=2
+construct x
+destruct x
+g while i=3
+construct x
+destruct x
+g while i=4
+construct x
+destruct x
+g while i=5
+construct x
+destruct x
+g while i=6
+construct x
+destruct x
+g while i=7
+construct x
+destruct x
+g while i=8
+construct x
+destruct x
+g while i=9
+construct x
+destruct x
+
+construct y
+g switch i=0
+destruct y
+construct y
+g switch i=1
+destruct y
+construct y
+g switch i=2
+destruct y
+construct y
+g switch i=3
+destruct y
+construct y
+g switch i=4
+destruct y
+construct y
+g switch i=5
+destruct y
+construct y
+g switch i=6
+destruct y
+construct y
+g switch i=7
+destruct y
+construct y
+g switch i=8
+destruct y
+construct y
+g switch i=9
+destruct y
+
+g for k=0
+g for i=0
+construct x
+g for j=0
+construct y
+continue L2
+destruct y
+g for j=1
+construct y
+break L2
+destruct y
+destruct x
+g for i=1
+construct x
+g for j=0
+construct y
+continue L2
+destruct y
+g for j=1
+construct y
+break L2
+destruct y
+destruct x
+g for i=2
+construct x
+continue L1
+destruct x
+g for i=3
+construct x
+break L1
+destruct x
+g for k=1
+g for i=0
+construct x
+g for j=0
+construct y
+continue L2
+destruct y
+g for j=1
+construct y
+break L2
+destruct y
+destruct x
+g for i=1
+construct x
+g for j=0
+construct y
+continue L2
+destruct y
+g for j=1
+construct y
+break L2
+destruct y
+destruct x
+g for i=2
+construct x
+continue L1
+destruct x
+g for i=3
+construct x
+break L1
+destruct x
+
+construct w
+construct v
+break L3
+destruct v
+destruct w
+
+h
+construct y
+L1
+construct x
+L2
+goto L1
+destruct x
+L1
+construct x
+L2
+goto L2
+L2
+goto L3
+L3
+goto L2-2
+L2
+goto L4
+destruct x
+destruct y
+L4
+goto L0
+construct y
+L1
+construct x
+L2
+goto L4
+destruct x
+destruct y
+L4
Index: src/tests/raii/.expect/globals.txt
===================================================================
--- src/tests/raii/.expect/globals.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/.expect/globals.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,9 @@
+static		inline		autogen		value
+no 		no 		no 		22
+no 		no 		yes		22
+no 		yes		no 		22
+no 		yes		yes		22
+yes		no 		no 		22
+yes		no 		yes		22
+yes		yes		no 		22
+yes		yes		yes		22
Index: src/tests/raii/.expect/memberCtors-ERR1.txt
===================================================================
--- src/tests/raii/.expect/memberCtors-ERR1.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/.expect/memberCtors-ERR1.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,1 @@
+raii/memberCtors.c:71:1 error: in void ?{}(B &b), field a2 used before being constructed
Index: src/tests/raii/.expect/memberCtors.txt
===================================================================
--- src/tests/raii/.expect/memberCtors.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/.expect/memberCtors.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,213 @@
+Before declaration of b1
+constructing int
+constructing int
+constructing int
+constructing int
+constructing int
+constructing int
+begin construct B
+assign b.a2
+constructing int
+constructing int
+begin construct A
+construct a.x
+constructing int: 1001
+assign a.y
+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
+constructing int
+begin construct A
+construct a.x
+constructing int: 1000
+assign a.y
+assigning int: 0 0
+end construct A
+end construct B
+destructing int: 0
+destructing int: 0
+destructing int: 1001
+Before declaration of b2
+copy constructing int: 0
+copy constructing int: 0
+begin copy construct A
+copy construct this.x
+copy constructing int: 1000
+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
+constructing int
+constructing int
+begin construct A
+construct a.x
+constructing int: 999
+assign a.y
+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
+destructing int: 1000
+destructing int: 0
+destructing int: 0
+destructing int: 999
+destructing int: 0
+destructing int: 0
+destructing int: 0
+destructing int: 0
+destructing int: 0
+destructing int: 999
+constructing int
+constructing int
+begin construct A
+construct a.x
+constructing int: 999
+assign a.y
+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
+destructing int: 1000
+destructing int: 0
+destructing int: 0
+destructing int: 999
+destructing int: 0
+destructing int: 0
+destructing int: 0
+destructing int: 0
+destructing int: 0
+destructing int: 999
Index: src/tests/raii/ctor-autogen.c
===================================================================
--- src/tests/raii/ctor-autogen.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/ctor-autogen.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,153 @@
+// TODO: add error cases (e.g., use of field constructors for managed types, etc.)
+
+enum Color { R, G, B };
+
+// empty struct/union should have generated ctor/dtors
+union U {};
+struct S {};
+
+struct SimpleUnion {
+	int x;
+	double y;
+	char z;
+};
+
+struct SimpleStruct {
+	int x;
+	double y;
+	char z;
+};
+
+// struct/union with members with generated ctor/dtors should themselves have generated ctor/dtors
+union PopulatedUnion {
+	Color c;
+	U u;
+	S s;
+};
+
+struct PopulatedStruct {
+	Color c;
+	U u;
+	S s;
+};
+
+// dtype-static generic type is otype
+forall(dtype T)
+struct DtypeStaticStruct {
+  T * data;
+  short size;
+};
+
+forall(dtype T)
+union DtypeStaticUnion {
+  T * data;
+  short size;
+};
+
+// dynamic generic type is otype
+forall(otype T)
+struct DynamicStruct {
+	T x;
+};
+
+forall(otype T)
+union DynamicUnion {
+	T x;
+};
+
+// struct/union that contains a generic type is
+struct GenericContainingStruct {
+	DynamicStruct(int) dsi;
+	DynamicStruct(double) dsd;
+	DynamicUnion(int) dui;
+	DynamicUnion(double) dud;
+	DtypeStaticStruct(int) dssi;
+	DtypeStaticStruct(float) dssf;
+	DtypeStaticUnion(int) dsui;
+	DtypeStaticUnion(float) dsuf;
+};
+
+union GenericContainingUnion {
+	DynamicStruct(int) dsi;
+	DynamicStruct(double) dsd;
+	DynamicUnion(int) dui;
+	DynamicUnion(double) dud;
+	DtypeStaticStruct(int) dssi;
+	DtypeStaticStruct(float) dssf;
+	DtypeStaticUnion(int) dsui;
+	DtypeStaticUnion(float) dsuf;
+};
+
+
+forall(otype T)
+T identity(T x) { return x; }
+
+// can identity e if only sized or only the assertion, but the combination breaks...
+// forall(dtype T | sized(T) | { void ?{}(T &); })
+// void identity(T x) {  }
+
+#if ERR1
+// managed type - defines a constructor - can't use field constructors
+struct Managed {
+	int x;
+};
+
+void ?{}(Managed & m) { m.x = 0; }
+
+// managed type since it contains a managed type - can't use field constructors
+struct InheritManaged {
+	Managed m;
+};
+
+Managed x = { 123 }; // error
+Managed y;           // okay
+
+InheritManaged z = { y };  // error?
+#endif
+
+int main() {
+	S s;
+	U u;
+	Color e;
+
+	// identity(R);  Color constant should be Color which is otype
+	identity(e);  // Color should be an otype
+	identity(u);  // U should be an otype
+	identity(s);  // S should be an otype
+
+	SimpleStruct ss;
+	SimpleUnion su;
+
+	identity(ss);
+	identity(su);
+
+	PopulatedStruct ps;
+	PopulatedUnion pu;
+
+	identity(ps); // should recursively be an otype
+	identity(pu); // should recursively be an otype
+
+	DynamicStruct(int) dsi;
+	DynamicStruct(double) dsd;
+	DynamicUnion(int) dui;
+	DynamicUnion(double) dud;
+	DtypeStaticStruct(int) dssi;
+	DtypeStaticStruct(float) dssf;
+	DtypeStaticUnion(int) dsui;
+	DtypeStaticUnion(float) dsuf;
+
+	identity(dsi);
+	identity(dsd);
+	// identity(dui); // xxx - codegen errors in generated thunk _temp3 (Box-pass-generated assignment return-temporary)
+	// identity(dud);
+	identity(dssi);
+	identity(dssf);
+	identity(dsui);
+	identity(dsuf);
+
+	GenericContainingStruct gcs;
+	GenericContainingUnion gcu;
+
+	identity(gcs);
+	identity(gcu);
+}
Index: src/tests/raii/dtor-early-exit.c
===================================================================
--- src/tests/raii/dtor-early-exit.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/dtor-early-exit.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,256 @@
+//
+// 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.
+//
+// dtor-early-exit.c --
+//
+// Author           : Rob Schluntz
+// Created On       : Wed Aug 17 08:26:25 2016
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Aug 17 08:29:37 2016
+// Update Count     : 2
+//
+
+#include <fstream>
+#include <stdlib>
+extern "C" {
+#define false ((int)0)	// until stdbool.h works
+#define assert(cond) if (! (cond)) { sout | "Assertion failed: (" | #cond | ") at " __FILE__ | ":" | __LINE__ | endl; abort(); }
+}
+
+struct A {
+	const char * name;
+	int * x;
+};
+
+// don't want these called
+void ?{}(A & a) { assert( false ); }
+void ?{}(A & a, const char * name) { a.name = name; sout | "construct " | name | endl; a.x = (int*)malloc(); }
+void ?{}(A & a, const char * name, int * ptr) { assert( false ); }
+
+A ?=?(A & a, A b) {  sout | "assign " | a.name | " " | b.name; return a; }
+void ?{}(A & a, A b) { sout | "copy construct " | b.name | endl; a.x = (int*)malloc(); }
+void ^?{}(A & a) { sout | "destruct " | a.name | endl; free(a.x); }
+
+// test returns
+void f(int i) {
+	sout | "f i=" | i | endl;
+	A x = { "x" };  // construct x
+	{
+		A y = { "y" }; // construct y
+		{
+			A z = { "z" }; // construct z
+			{
+				if (i == 0) return; // destruct x, y, z
+			}
+			if (i == 1) return; // destruct x, y, z
+			// destruct z
+		}
+		if (i == 2) return; // destruct x, y
+		// destruct y
+	}
+	return; // destruct x
+}
+
+// test loops, switch, etc.
+void g() {
+	for (int i = 0; i < 10; i++) {
+		sout | "g for i=" | i | endl;
+		A x = { "x" };
+		// construct x
+		// destruct x
+	}
+	sout | endl;
+	{
+		int i = 0;
+		while (i < 10) {
+			sout | "g while i=" | i | endl;
+			A x = { "x" };
+			// construct x
+			i++;
+			// destruct x
+		}
+	}
+	sout | endl;
+	for (int i = 0; i < 10; i++) {
+		switch(10) {
+			case 0:
+			case 5:
+			case 10: {
+				A y = { "y" };
+				sout | "g switch i=" | i | endl;
+				// construct y
+				break; // destruct y
+			}
+			default: {
+				sout | "g switch i=" | i | endl;
+				A x = { "x" };
+				// construct x
+				break; // destruct x
+			}
+		}
+	}
+	sout | endl;
+	for (int k = 0; k < 2; k++) {
+		sout | "g for k=" | k | endl;
+		L1: for (int i = 0; i < 10; i++) {
+			sout | "g for i=" | i | endl;
+
+			A x = { "x" };
+			if (i == 2) {
+				sout | "continue L1" | endl;
+				continue;  // destruct x
+			} else if (i == 3) {
+				sout | "break L1" | endl;
+				break;  // destruct x
+			}
+
+			L2: for (int j = 0; j < 10; j++) {
+				sout | "g for j=" | j | endl;
+				A y = { "y" };
+				if (j == 0) {
+					sout | "continue L2" | endl;
+					continue; // destruct y - missing because object that needs to be destructed is not a part of this block, it's a part of the for's block
+				} else if (j == 1) {
+					sout | "break L2" | endl;
+					break;  // destruct y
+				} else if (i == 1) {
+					sout | "continue L1" | endl;
+					continue L1; // destruct x,y - note: continue takes you to destructors for block, so only generate destructor for y
+				} else if (k == 1) {
+					sout | "break L1" | endl;
+					break L1;  // destruct x,y
+				}
+			}
+		}
+	}
+
+	sout | endl;
+	L3: if( 3 ) {
+		A w = { "w" };
+		if( 4 ) {
+			A v = { "v" };
+			sout | "break L3" | endl;
+			break L3;
+		}
+	}
+}
+
+// test goto
+void h() {
+	int i = 0;
+	// for each goto G with target label L:
+	// * find all constructed variables alive at G (set S_G)
+	// * find all constructed variables alive at L (set S_L)
+	// * if S_L-S_G is non-empty, error
+	// * emit destructors for all variables in S_G-S_L
+	sout | "h" | endl;
+	{
+		L0: ;
+#ifdef ERR1
+			goto L1; // this is an error in g++ because it skips initialization of y
+#endif
+			A y = { "y" };
+			// S_L1 = { y }
+		L1: sout | "L1" | endl;
+			A x = { "x" };
+			// S_L2 = { y, x }
+		L2: sout | "L2" | endl;
+			if (i == 0) {
+				++i;
+				sout | "goto L1" | endl;
+				// S_G = { y, x }
+				goto L1;  // jump back, destruct b/c before x definition
+				// S_L-S_G = {} => no error
+				// S_G-S_L = { x } => destruct x
+			} else if (i == 1) {
+				++i;
+				sout | "goto L2" | endl;
+				// S_G = { y, x }
+				goto L2;  // jump back, do not destruct
+				// S_L-S_G = {}
+				// S_G-S_L = {} => destruct nothing
+			} else if (i == 2) {
+				++i;
+				sout | "goto L3" | endl;
+				// S_G = { y, x }
+				goto L3;  // jump ahead, do not destruct
+				// S_L-S_G = {}
+				// S_G-S_L = {}
+			} else if (false) {
+				++i;
+				A z = { "z" };
+				sout | "goto L3-2" | endl;
+				// S_G = { z, y, x }
+				goto L3;
+				// S_L-S_G = {}
+				// S_G-S_L = {z} => destruct z
+			} else {
+				++i;
+				sout | "goto L4" | endl;
+				// S_G = { y, x }
+				goto L4;  // jump ahead, destruct b/c left block x was defined in
+				// S_L-S_G = {}
+				// S_G-S_L = { y, x } => destruct y, x
+			}
+			// S_L3 = { y, x }
+		L3: sout | "L3" | endl;
+			sout | "goto L2-2" | endl;
+			// S_G = { y, x }
+			goto L2; // jump back, do not destruct
+			// S_L-S_G = {}
+			// S_G-S_L = {}
+	}
+	// S_L4 = {}
+	L4: sout | "L4" | endl;
+	if (i == 4) {
+		sout | "goto L0" | endl;
+		// S_G = {}
+		goto L0;
+		// S_L-S_G = {}
+		// S_G-S_L = {}
+	}
+#ifdef ERR2
+	// S_G = {}
+	if (i == 5) goto L2; // this is an error in g++ because it skips initialization of y, x
+	// S_L-S_G = { y, x } => non-empty, so error
+#endif
+}
+
+// TODO: implement __label__ and uncomment these lines
+void computedGoto() {
+  // __label__ bar;
+  void *ptr;
+  ptr = &&foo;
+  goto *ptr;
+  assert(false);
+foo: ;
+//   void f() {
+//     ptr = &&bar;
+//     goto *ptr;
+//     assert(false);
+//   }
+//   f();
+//   assert(false);
+// bar: ;
+}
+
+int main() {
+	sepDisable(sout);
+	for (int i = 0; i < 4; i++) {
+		f(i);
+	}
+	sout | endl;
+	g();
+	sout | endl;
+	h();
+
+	computedGoto();
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// compile-command: "cfa dtor-early-exit" //
+// End: //
Index: src/tests/raii/globals.c
===================================================================
--- src/tests/raii/globals.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/globals.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,83 @@
+#include <fstream>
+
+struct value_t {
+	int value;
+};
+
+void ?{}( value_t & this ) { this.value = 22; }
+
+//Standard case
+struct g_t {
+	value_t val;
+};
+
+void ?{}( g_t & this ) { (this.val){}; }
+
+g_t g;
+
+//Autogen case
+struct ga_t {
+	value_t val;
+};
+
+ga_t ga;
+
+//Inline case
+struct gi_t;
+void ?{}( gi_t & this );
+
+struct gi_t {
+	value_t val;
+} gi;
+
+void ?{}( gi_t & this ) { (this.val){}; }
+
+//Inline autogen case
+struct gia_t {
+	value_t val;
+} gia;
+
+//Static case
+struct gs_t {
+	value_t val;
+};
+
+void ?{}( gs_t & this ) { (this.val){}; }
+
+static gs_t gs;
+
+//Static autogen case
+struct gsa_t {
+	value_t val;
+};
+
+static gsa_t gsa;
+
+//Static inline case
+struct gsi_t;
+void ?{}( gsi_t & this );
+
+static struct gsi_t {
+	value_t val;
+} gsi;
+
+void ?{}( gsi_t & this ) { (this.val){}; }
+
+//Static inline autogen case
+static struct gsia_t {
+	value_t val;
+} gsia;
+
+int main() {
+	sout | "static\t\tinline\t\tautogen\t\tvalue" | endl;
+
+	sout | "no \t\tno \t\tno \t\t" | g.val.value    | endl;
+	sout | "no \t\tno \t\tyes\t\t" | ga.val.value   | endl;
+	sout | "no \t\tyes\t\tno \t\t" | gi.val.value   | endl;
+	sout | "no \t\tyes\t\tyes\t\t" | gia.val.value  | endl;
+	sout | "yes\t\tno \t\tno \t\t" | gs.val.value   | endl;
+	sout | "yes\t\tno \t\tyes\t\t" | gsa.val.value  | endl;
+	sout | "yes\t\tyes\t\tno \t\t" | gsi.val.value  | endl;
+	sout | "yes\t\tyes\t\tyes\t\t" | gsia.val.value | endl;
+
+}
Index: src/tests/raii/init_once.c
===================================================================
--- src/tests/raii/init_once.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/init_once.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,195 @@
+//
+// 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.
+//
+// init_once.c --
+//
+// Author           : Rob Schluntz
+// Created On       : Tue Jun 14 15:43:35 2016
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Sat Jul  9 11:30:29 2016
+// Update Count     : 3
+//
+
+// want to ensure ctor/dtor called at most once per object.
+// whole point of ctor/dtor is that you don't know what's in
+// memory when it's first called, so can't rely on member to
+// determine if this is true. instead, keep an array
+// of addresses that have been constructed and remove the element
+// when it's destructed (and vice-versa)
+
+//*** setup
+extern "C" {
+#define NULL 0
+void * malloc(size_t);
+void free(void *);
+#define assert(cond) if (! (cond)) { printf("Assertion failed: (%s) at %s:%d\n", #cond, __FILE__, __LINE__); abort(); }
+void *memset(void *s, int c, size_t n);
+}
+
+// dummy type
+struct init_once { int * x; };
+
+// array and operations
+// const int size = 1024;
+#define size 1024
+struct array {
+	init_once * elems[size];
+	int length;
+};
+void remove(array * arr, init_once * x) {
+	for (int i = 0; i < arr->length; i++) {
+		if ( arr->elems[i] == x ) {
+			arr->elems[i] = arr->elems[--arr->length];
+			return;
+		}
+	}
+}
+void insert(array * arr, init_once * x) {
+	assert( arr->length < size );
+	arr->elems[arr->length++] = x;
+}
+int find(array * arr, init_once * x) {
+	for (int i = 0; i < arr->length; i++) {
+		if ( arr->elems[i] == x ) {
+			return i;
+		}
+	}
+	return -1;
+}
+void ?{}(array & arr) {
+	memset(arr.elems, 0, sizeof(arr.elems));
+	arr.length = 0;
+}
+array constructed;
+array destructed;
+
+void ?{}(init_once & x) {
+	assert( find( &constructed, &x ) == -1 );
+	remove( &destructed, &x );
+	insert( &constructed, &x );
+
+	x.x = (int *)malloc(sizeof(int));
+}
+
+void ?{}(init_once & x, init_once other) {
+	x{};  // reuse default ctor
+}
+
+void ^?{}(init_once & x) {
+	assert( find( &destructed, &x ) == -1 );
+	remove( &constructed, &x );
+	insert( &destructed, &x );
+
+	free(x.x);
+}
+//*** end setup
+
+// test globals
+init_once x;
+init_once y = x;
+
+void static_variable() {
+	static init_once x;
+}
+
+int main() {
+	// local variables
+	init_once x;
+	init_once y = x;
+
+	// block scoped variables
+	{
+		init_once x;
+		init_once y = x;
+	}
+
+	// loop variables
+	for (int i = 0 ; i < 10; i++) {
+		init_once x;
+		init_once y = x;
+	}
+	int i = 0;
+	while (i < 10) {
+		init_once x;
+		init_once y = x;
+		i++;
+	}
+
+	// declared in a switch block with a break
+	for (int i = 0; i < 10; i++) {
+		switch (10) {
+			case 1: {
+				init_once x;
+				init_once y = x;
+				x{}; // ensure this doesn't execute
+				break;
+			}
+			case 10: {
+				init_once x;
+				init_once y = x;
+			} // fall through
+			default: {
+				init_once x;
+				init_once y = x;
+				break;
+			}
+		}
+	}
+
+	// labeled break/continue
+	L3: for (int k = 0; k < 10; k++) {
+		init_once x;
+		init_once y = x;
+		L1: for (int i = 0; i < 10; i++){
+			init_once x;
+			init_once y = x;
+			L2: for (int j = 0; j < 10; j++) {
+				init_once x;
+				init_once y = x;
+
+				if (i == 0) continue L1;
+				if (i == 1) continue L2;
+				if (i == 2) break L2;
+				if (i == 3) break L1;
+				if (i == 4) continue L3;
+				if (i == 9) break L3;
+				// if (i == 5) goto ;
+			}
+		}
+	}
+
+	// labeled break/continue with if
+	LL1: for (int k = 0; k < 10; k++) {
+		init_once x;
+		init_once y = x;
+		LL2: for (int i = 0; i < 10; i++){
+			init_once x;
+			init_once y = x;
+			LL3: if( i < 5) {
+				init_once x;
+				init_once y = x;
+
+				if (i == 0) continue LL2;
+				if (i == 2) break LL3;
+				if (i == 3) break LL2;
+				if (i == 4) continue LL1;
+			} else {
+				if (i == 9) break LL1;
+				// if (i == 5) goto ;
+			}
+		}
+	}
+
+	// function-scoped static variable
+	for (int i = 0; i < 10; i++) {
+		static_variable();
+	}
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// compile-command: "cfa init_once.c" //
+// End: //
Index: src/tests/raii/memberCtors.c
===================================================================
--- src/tests/raii/memberCtors.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/memberCtors.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,91 @@
+struct WrappedInt {
+  int x;
+};
+
+void ?{}(WrappedInt & this) {
+  printf("constructing int\n");
+  this.x = 0;
+}
+
+void ?{}(WrappedInt & this, WrappedInt other) {
+  printf("copy constructing int: %d\n", other.x);
+  this.x = other.x;
+}
+
+void ?{}(WrappedInt & this, int x) {
+  printf("constructing int: %d\n", x);
+  this.x = x;
+}
+
+void ^?{}(WrappedInt & this) {
+  printf("destructing int: %d\n", this.x);
+}
+
+void ?=?(WrappedInt & this, int x) {
+  printf("assigning int: %d %d\n", this.x, x);
+  this.x = x;
+}
+
+struct A {
+  WrappedInt x, y, z;
+};
+
+void ?{}(A & a) {
+  // currently must define default ctor, since there's no "= default" syntax
+}
+
+void ?{}(A & a, int x) {
+  printf("begin construct A\n");
+  printf("construct a.x\n");
+  (a.x){ x+999 };
+  printf("assign a.y\n");
+  a.y = 0; // not a constructor - default constructor will be inserted
+  printf("end construct A\n");
+} // z never constructed - will be automatically default constructed
+
+void ?{}(A & this, A other) {
+  printf("begin copy construct A\n");
+  printf("copy construct this.x\n");
+  (this.x){ other.x };
+  printf("assign this.y\n");
+  this.y = other.y; // not a constructor - copy constructor will be inserted
+  printf("end copy construct A\n");
+} // 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;
+};
+
+void ?{}(B & b) {
+  printf("begin construct B\n");
+  printf("assign b.a2\n");
+  b.a2 = (A) { 2 };
+  printf("construct b.a1\n");
+  (b.a1){ 1 };
+#ifdef ERR1
+  (b.a2){ b.a3 }; // error, b->a2 was used previously but is explicitly constructed
+#endif
+  printf("end construct B\n");
+} // a2, a3 never constructed - will be automatically default constructed
+
+void ^?{}(B & b) {
+  b.a2 = (A) { 0 };
+  ^(b.a1){};
+} // a2, a3 never destructed - will be automatically destructed
+
+int main() {
+  printf("Before declaration of b1\n");
+  B b1;
+  printf("Before declaration of b2\n");
+  B b2 = b1;
+  printf("End of main\n");
+}
Index: src/tests/raii/multiDimension.c
===================================================================
--- src/tests/raii/multiDimension.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/multiDimension.c	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,75 @@
+struct X {
+  int a;
+  int * ptr;
+};
+
+void ?{}(X & this) {
+  printf("default constructing\n");
+  (this.a){ 123 };
+  this.ptr = (int *)malloc(sizeof(int));
+}
+
+void ?{}(X & this, X other) {
+  printf("copy constructing\n");
+  (this.a){ other.a };
+  this.ptr = (int *)malloc(sizeof(int));
+}
+
+void ?{}(X & this, int a) {
+  printf("constructing with %d\n", a);
+  (this.a){ a };
+  this.ptr = (int *)malloc(sizeof(int));
+}
+
+void ^?{}(X & this) {
+  printf("destructing\n");
+  free(this.ptr);
+}
+
+X ?=?(X & this, X other) {
+  this.a = other.a;
+  return this;
+}
+
+X global[10][10] = {
+  { 1, { 2 }, { 3 }, { 4 }, 5, 6, 7, 8, 9, 10, 11, 12 },
+  { 1, 2, 3, 4 },
+  { { 1234567 } }
+};
+
+X global2[3][3][3] = {
+  {
+    { 1, 2, 3 },
+    { 4, 5, 6 },
+    { 7, 8, 9 },
+    { 10, 11, 12 }
+  },
+  {
+    { 0, 0, 0 }
+  }
+};
+
+int foo() {
+  static X abc[3][3] = {
+    { 11, 22, 33, 44 },
+    { 55, 66 },
+    { 77 },
+    { 88, 99, 1010 }
+  };
+}
+
+// ensure constructed const arrays continue to compile
+const int global[1] = { -2 };
+
+int main() {
+  X abc[4][4] = {
+    { 999, 1111 },
+    { 1, 2, 3, 4, 5 },
+    {},
+    { 0 },
+    { 88 }
+  };
+
+  foo();
+  foo();
+}
Index: src/tests/raii/multiDimension.txt
===================================================================
--- src/tests/raii/multiDimension.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
+++ src/tests/raii/multiDimension.txt	(revision 80e858296a11df7ba60e2471af77bbac5626b427)
@@ -0,0 +1,304 @@
+constructing with 1
+constructing with 2
+constructing with 3
+constructing with 4
+constructing with 5
+constructing with 6
+constructing with 7
+constructing with 8
+constructing with 9
+constructing with 10
+constructing with 1
+constructing with 2
+constructing with 3
+constructing with 4
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+constructing with 1234567
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+constructing with 1
+constructing with 2
+constructing with 3
+constructing with 4
+constructing with 5
+constructing with 6
+constructing with 7
+constructing with 8
+constructing with 9
+constructing with 0
+constructing with 0
+constructing with 0
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+constructing with 999
+constructing with 1111
+default constructing
+default constructing
+constructing with 1
+constructing with 2
+constructing with 3
+constructing with 4
+default constructing
+default constructing
+default constructing
+default constructing
+constructing with 0
+default constructing
+default constructing
+default constructing
+constructing with 11
+constructing with 22
+constructing with 33
+constructing with 55
+constructing with 66
+default constructing
+constructing with 77
+default constructing
+default constructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
