Index: src/examples/gc_no_raii/bug-repro/find.c
===================================================================
--- src/examples/gc_no_raii/bug-repro/find.c	(revision df4aea7ba7f621d92d959bff25f0126d5b820869)
+++ src/examples/gc_no_raii/bug-repro/find.c	(revision df4aea7ba7f621d92d959bff25f0126d5b820869)
@@ -0,0 +1,10 @@
+
+void main()
+{
+	int a[3] = {1, 2, 3};
+	int* begin = a;
+	int *const end = begin + 3;
+
+	int* f = find(begin, &end, 2);
+
+}
Index: src/examples/gc_no_raii/bug-repro/inline.c
===================================================================
--- src/examples/gc_no_raii/bug-repro/inline.c	(revision df4aea7ba7f621d92d959bff25f0126d5b820869)
+++ src/examples/gc_no_raii/bug-repro/inline.c	(revision df4aea7ba7f621d92d959bff25f0126d5b820869)
@@ -0,0 +1,8 @@
+inline _Bool test(int t){
+	return t == 3;
+}
+
+int main()
+{
+	test(6);
+}
Index: src/examples/gc_no_raii/bug-repro/push_back.c
===================================================================
--- src/examples/gc_no_raii/bug-repro/push_back.c	(revision 385c1309bdc9ace6d6de8377cf50fe8b65bccccb)
+++ src/examples/gc_no_raii/bug-repro/push_back.c	(revision df4aea7ba7f621d92d959bff25f0126d5b820869)
@@ -2,47 +2,15 @@
 #include <stdint.h>
 
-//------------------------------------------------------------------------------
-//Declaration
-trait allocator_c(otype T, otype allocator_t) {
-	void realloc(allocator_t*, size_t);
-	T* data(allocator_t*);
-};
-
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
-struct vector
-{
-	allocator_t storage;
-	size_t size;
-};
-
-//------------------------------------------------------------------------------
-//Allocator
-forall(otype T)
-struct heap_allocator
-{
-	T* storage;
-	size_t capacity;
-};
-
-forall(otype T)
-void realloc(heap_allocator(T)* this, size_t size);
-
-forall(otype T)
-inline T* data(heap_allocator(T)* this)
-{
-	return this->storage;
-}
-
-//------------------------------------------------------------------------------
-//Modifiers
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
-void push_back(vector(T, allocator_t)* this, T value);
+#include "push_back.h"
 
 typedef vector(intptr_t*, heap_allocator(intptr_t*)) worklist_t;
 
-inline void test()
+void test()
 {
 	worklist_t w;
-	intptr_t zero = 0;
-	push_back(&w, &zero);
+	if(!empty(&w))
+	{
+		intptr_t zero = 0;
+		push_back(&w, &zero);
+	}
 }
Index: src/examples/gc_no_raii/bug-repro/push_back.h
===================================================================
--- src/examples/gc_no_raii/bug-repro/push_back.h	(revision df4aea7ba7f621d92d959bff25f0126d5b820869)
+++ src/examples/gc_no_raii/bug-repro/push_back.h	(revision df4aea7ba7f621d92d959bff25f0126d5b820869)
@@ -0,0 +1,72 @@
+//------------------------------------------------------------------------------
+//Declaration
+trait allocator_c(otype T, otype allocator_t) {
+	void ctor(allocator_t* const);
+	void dtor(allocator_t* const);
+	void realloc(allocator_t* const, size_t);
+	T* data(allocator_t* const);
+};
+
+forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+struct vector
+{
+	allocator_t storage;
+	size_t size;
+};
+
+//------------------------------------------------------------------------------
+//Initialization
+forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+void vector_ctor(vector(T, allocator_t) *const this);
+
+forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+void dtor(vector(T, allocator_t) *const this);
+
+//------------------------------------------------------------------------------
+//Allocator
+forall(otype T)
+struct heap_allocator
+{
+	T* storage;
+	size_t capacity;
+};
+
+forall(otype T)
+void ctor(heap_allocator(T) *const this);
+
+forall(otype T)
+void dtor(heap_allocator(T) *const this);
+
+forall(otype T)
+void realloc(heap_allocator(T) *const this, size_t size);
+
+forall(otype T)
+inline T* data(heap_allocator(T) *const this)
+{
+	return this->storage;
+}
+
+//------------------------------------------------------------------------------
+//Capacity
+forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+inline bool empty(vector(T, allocator_t) *const this)
+{
+	return this->size == 0;
+}
+
+forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+inline bool size(vector(T, allocator_t) *const this)
+{
+	return this->size;
+}
+
+forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+inline void reserve(vector(T, allocator_t) *const this, size_t size)
+{
+	realloc(&this->storage, this->size+1);
+}
+
+//------------------------------------------------------------------------------
+//Modifiers
+forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+void push_back(vector(T, allocator_t) *const this, T value);
