Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision cc640aadedb54d666759f45d5d89d72bd7bf5be3)
+++ src/tests/Makefile.am	(revision 4782b39e54b2c6a1e1d94c773e7527cd55d4ed85)
@@ -18,5 +18,6 @@
 
 # applies to both programs
-CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ # TEMPORARY: does not build with -O2
+EXTRA_FLAGS =
+CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS}
 CC = @CFA_BINDIR@/cfa
 
Index: src/tests/Makefile.in
===================================================================
--- src/tests/Makefile.in	(revision cc640aadedb54d666759f45d5d89d72bd7bf5be3)
+++ src/tests/Makefile.in	(revision 4782b39e54b2c6a1e1d94c773e7527cd55d4ed85)
@@ -123,7 +123,5 @@
 CFA_LIBDIR = @CFA_LIBDIR@
 CFA_PREFIX = @CFA_PREFIX@
-
-# applies to both programs
-CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ # TEMPORARY: does not build with -O2
+CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS}
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
@@ -224,4 +222,7 @@
 top_srcdir = @top_srcdir@
 debug = yes
+
+# applies to both programs
+EXTRA_FLAGS = 
 fstream_test_SOURCES = fstream_test.c
 vector_test_SOURCES = vector/vector_int.c vector/array.c vector/vector_test.c
Index: src/tests/test.py
===================================================================
--- src/tests/test.py	(revision cc640aadedb54d666759f45d5d89d72bd7bf5be3)
+++ src/tests/test.py	(revision 4782b39e54b2c6a1e1d94c773e7527cd55d4ed85)
@@ -116,5 +116,5 @@
 
 	# build, skipping to next test on error
-	make_ret, _ = sh("""%s CFLAGS="-quiet %s" %s 2> %s 1> /dev/null""" % (make_cmd, options, test.name, out_file), dry_run)
+	make_ret, _ = sh("""%s EXTRA_FLAGS="-quiet %s" %s 2> %s 1> /dev/null""" % (make_cmd, options, test.name, out_file), dry_run)
 
 	# if the make command succeds continue otherwise skip to diff
