Index: src/tests/coroutine/.expect/runningTotal.txt
===================================================================
--- src/tests/coroutine/.expect/runningTotal.txt	(revision 92494fd9dc17eade9b016796c0673138c301edd4)
+++ src/tests/coroutine/.expect/runningTotal.txt	(revision 92494fd9dc17eade9b016796c0673138c301edd4)
@@ -0,0 +1,10 @@
+0 0
+1 1
+2 3
+3 6
+4 10
+5 15
+6 21
+7 28
+8 36
+9 45
Index: src/tests/coroutine/runningTotal.c
===================================================================
--- src/tests/coroutine/runningTotal.c	(revision 92494fd9dc17eade9b016796c0673138c301edd4)
+++ src/tests/coroutine/runningTotal.c	(revision 92494fd9dc17eade9b016796c0673138c301edd4)
@@ -0,0 +1,51 @@
+// 
+// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+// 
+// runningTotal.c -- 
+// 
+// Author           : Peter A. Buhr
+// Created On       : Wed Dec  6 08:05:27 2017
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Dec  6 08:09:24 2017
+// Update Count     : 2
+// 
+
+#include <fstream>
+#include <coroutine>
+
+coroutine RunTotal {									// input numbers and return running total
+	int input, total;									// communication
+};
+
+void ?{}( RunTotal & rntl ) { rntl.total = 0; }
+
+void update( RunTotal & rntl, int input ) with( rntl ) { // helper
+	total += input;										// remember between activations
+	suspend();											// inactivate on stack
+}
+
+void main( RunTotal & rntl ) with( rntl ) {
+	for ( ;; ) {
+		update( rntl, input );
+	} // for
+}
+
+int add( RunTotal & rntl, int input ) {
+	rntl.input = input;									// pass input to coroutine
+	resume( rntl );
+	return rntl.total;									// return total from coroutine
+}
+int main() {
+	RunTotal rntl;
+	for ( int i = 0; i < 10; i += 1 ) {
+		sout | i | add( rntl, i ) | endl;
+	} // for
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// compile-command: "cfa runningTotal.c" //
+// End: //
