Index: src/tests/.expect/ctor-autogen.txt
===================================================================
--- src/tests/.expect/ctor-autogen.txt	(revision 8e138da82cb7825087e9c8210a54d331b4d21cfd)
+++ src/tests/.expect/ctor-autogen.txt	(revision 8e138da82cb7825087e9c8210a54d331b4d21cfd)
@@ -0,0 +1,1 @@
+
Index: src/tests/ctor-autogen.c
===================================================================
--- src/tests/ctor-autogen.c	(revision 8e138da82cb7825087e9c8210a54d331b4d21cfd)
+++ src/tests/ctor-autogen.c	(revision 8e138da82cb7825087e9c8210a54d331b4d21cfd)
@@ -0,0 +1,36 @@
+enum Color { R, G, B };
+
+// empty struct/union should have generated ctor/dtors
+union U {};
+struct S {};
+
+// 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 state;
+	U u;
+	S s;
+};
+
+forall(otype T)
+T identity(T x) { return x; }
+
+int main() {
+	S s;
+	U u;
+
+	identity(R);  // Color should be an otype
+	identity(u);  // U should be an otype
+	identity(s);  // S should be an otype
+
+	PopulatedStruct ps;
+	PopulatedUnion pu;
+
+	identity(ps); // should recursively be an otype
+	identity(pu); // should recursively be an otype
+}
